mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-26 23:02:04 -04:00
Fix /unload empty not working on recent Mono versions. (Thanks Jjp137)
This commit is contained in:
parent
ae9ed7ba9e
commit
88049e67f9
@ -36,10 +36,11 @@ namespace MCGalaxy.Commands
|
||||
if (!p.level.Unload())
|
||||
Player.SendMessage(p, "You cannot unload this level.");
|
||||
} else if (name == "empty") {
|
||||
Server.levels.ForEach(l => {
|
||||
if (l.players.Count <= 0 && l != Server.mainLevel)
|
||||
l.Unload(true, true);
|
||||
});
|
||||
for (int i = 0; i < Server.levels.Count; i++) {
|
||||
Level l = Server.levels[i];
|
||||
if (l.players.Count <= 0 && l.Unload(true, true))
|
||||
i--;
|
||||
}
|
||||
} else {
|
||||
Level level = LevelInfo.Find(name);
|
||||
if (level == null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user