Fix /os map guns throwing a NullReferenceException.

This commit is contained in:
UnknownShadow200 2016-04-07 16:43:44 +10:00
parent 95aeffe10e
commit 5fd7a87351
2 changed files with 9 additions and 9 deletions

View File

@ -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);

View File

@ -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.");
}
}