mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-25 22:30:52 -04:00
Fix /os map guns throwing a NullReferenceException.
This commit is contained in:
parent
95aeffe10e
commit
5fd7a87351
@ -206,7 +206,7 @@ namespace MCGalaxy.Commands
|
||||
Level.SaveSettings(p.level);
|
||||
}
|
||||
} else if (cmd == "GUNS") {
|
||||
Command.all.Find("allowguns").Use(p, null);
|
||||
Command.all.Find("allowguns").Use(p, "");
|
||||
} else if (cmd == "PERVISIT") {
|
||||
string rank = value == "" ? Server.defaultRank : value;
|
||||
Command.all.Find("pervisit").Use(p, rank);
|
||||
|
@ -125,19 +125,19 @@ namespace MCGalaxy.Games {
|
||||
List<Player> DoRoundCountdown() {
|
||||
while (true) {
|
||||
RoundStart = DateTime.UtcNow.AddSeconds(30);
|
||||
CurLevel.ChatLevel("%4Round Start:%f 30...");
|
||||
CurLevel.ChatLevel("&4Round Start:&f 30...");
|
||||
Thread.Sleep(20000); if (!Running) return null;
|
||||
CurLevel.ChatLevel("%4Round Start:%f 10...");
|
||||
CurLevel.ChatLevel("&4Round Start:&f 10...");
|
||||
Thread.Sleep(10000); if (!Running) return null;
|
||||
CurLevel.ChatLevel("%4Round Start:%f 5...");
|
||||
CurLevel.ChatLevel("&4Round Start:&f 5...");
|
||||
Thread.Sleep(1000); if (!Running) return null;
|
||||
CurLevel.ChatLevel("%4Round Start:%f 4...");
|
||||
CurLevel.ChatLevel("&4Round Start:&f 4...");
|
||||
Thread.Sleep(1000); if (!Running) return null;
|
||||
CurLevel.ChatLevel("%4Round Start:%f 3...");
|
||||
CurLevel.ChatLevel("&4Round Start:&f 3...");
|
||||
Thread.Sleep(1000); if (!Running) return null;
|
||||
CurLevel.ChatLevel("%4Round Start:%f 2...");
|
||||
CurLevel.ChatLevel("&4Round Start:&f 2...");
|
||||
Thread.Sleep(1000); if (!Running) return null;
|
||||
CurLevel.ChatLevel("%4Round Start:%f 1...");
|
||||
CurLevel.ChatLevel("&4Round Start:&f 1...");
|
||||
Thread.Sleep(1000); if (!Running) return null;
|
||||
int nonRefPlayers = 0;
|
||||
List<Player> players = new List<Player>();
|
||||
@ -151,7 +151,7 @@ namespace MCGalaxy.Games {
|
||||
}
|
||||
|
||||
if (nonRefPlayers >= 2) return players;
|
||||
CurLevel.ChatLevel(Colors.red + "ERROR: Need 2 or more players to play");
|
||||
CurLevel.ChatLevel("&cNeed 2 or more players to start a round.");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user