Fix zones getting lost with /resizelvl (Thanks starlightglimmer)

This commit is contained in:
UnknownShadow200 2020-03-22 23:38:22 +11:00
parent d63b498c31
commit c91cfc7360

View File

@ -104,6 +104,11 @@ namespace MCGalaxy.Commands.World {
lock (lvl.saveLock) { lock (lvl.saveLock) {
lvl.Backup(true); lvl.Backup(true);
// Make sure zones are kept
res.Zones = lvl.Zones;
lvl.Zones = new VolatileArray<Zone>(false);
IMapExporter.Formats[0].Write(LevelInfo.MapPath(lvl.name), res); IMapExporter.Formats[0].Write(LevelInfo.MapPath(lvl.name), res);
lvl.SaveChanges = false; lvl.SaveChanges = false;
} }