mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-28 16:07:07 -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())
|
if (!p.level.Unload())
|
||||||
Player.SendMessage(p, "You cannot unload this level.");
|
Player.SendMessage(p, "You cannot unload this level.");
|
||||||
} else if (name == "empty") {
|
} else if (name == "empty") {
|
||||||
Server.levels.ForEach(l => {
|
for (int i = 0; i < Server.levels.Count; i++) {
|
||||||
if (l.players.Count <= 0 && l != Server.mainLevel)
|
Level l = Server.levels[i];
|
||||||
l.Unload(true, true);
|
if (l.players.Count <= 0 && l.Unload(true, true))
|
||||||
});
|
i--;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Level level = LevelInfo.Find(name);
|
Level level = LevelInfo.Find(name);
|
||||||
if (level == null) {
|
if (level == null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user