Rewrite the level.dat properly. This fixes SPIGOT-46

This commit is contained in:
Fabian Faßbender committed 2014-11-29 20:33:33 +01:00
1 parent a497e45503
commit b08f233fe1
3 files changed
+1340 -30

No files matched your search

@@ -849,6 +849,7 @@ public final class CraftServer implements Server {
if (worlddata == null) {
worlddata = new WorldData(new WorldSettings(creator.seed(), EnumGamemode.getById(getDefaultGameMode().getValue()), generateStructures, hardcore, type), name);
}
worlddata.checkName(name); // CraftBukkit - Migration did not rewrite the level.dat; This forces 1.8 to take the last loaded world as respawn (in this case the end)
WorldServer internal = (WorldServer) new WorldServer(console, sdm, worlddata, dimension, console.methodProfiler, creator.environment(), generator).b();
if (!(worlds.containsKey(name.toLowerCase()))) {