Fix /resizelvl not changing main world, if the old world was set to the server's main world.

This commit is contained in:
UnknownShadow200 2016-07-25 22:27:17 +10:00
parent 3be8c02faa
commit 60586a67e0
2 changed files with 4 additions and 1 deletions

View File

@ -47,7 +47,7 @@ namespace MCGalaxy.Commands.World {
bool confirmed = args.Length > 4 && args[4].CaselessEq("confirm");
if (!confirmed && (x < lvl.Width || y < lvl.Height || z < lvl.Length)) {
Player.Message(p, "New level dimensions are smaller than the current dimensions, &cyou will lose blocks%S.");
Player.Message(p, "Type %T/resizelvl {0} {1} {2} {3} confirm %Sif you are sure.", args[0], x, y, z);
Player.Message(p, "Type %T/resizelvl {0} {1} {2} {3} confirm %Sif you're sure.", args[0], x, y, z);
return;
}

View File

@ -145,7 +145,10 @@ namespace MCGalaxy {
pl.level = lvl;
ReloadMap(null, pl, false);
}
old.Unload(true, false);
if (old == Server.mainLevel)
Server.mainLevel = lvl;
}
public static void ReloadMap(Player p, Player who, bool showMessage) {