diff options
author | EvilSeph <evilseph@gmail.com> | 2011-07-13 03:29:43 -0400 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2011-07-13 03:29:43 -0400 |
commit | 7f6e7060d753a9ce6ca977191b21998dc1109f22 (patch) | |
tree | c60f1fee99791ace95ee2b39d9c186fa00e1d0cb | |
parent | eb19e4e8dc33d72cc940081dde7771bb1d900d77 (diff) | |
download | craftbukkit-7f6e7060d753a9ce6ca977191b21998dc1109f22.tar craftbukkit-7f6e7060d753a9ce6ca977191b21998dc1109f22.tar.gz craftbukkit-7f6e7060d753a9ce6ca977191b21998dc1109f22.tar.lz craftbukkit-7f6e7060d753a9ce6ca977191b21998dc1109f22.tar.xz craftbukkit-7f6e7060d753a9ce6ca977191b21998dc1109f22.zip |
Account for world UID conflicts.
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/CraftServer.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index 0b27c8eb..94120a95 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -400,6 +400,13 @@ public final class CraftServer implements Server { int dimension = 10 + console.worlds.size(); WorldServer internal = new WorldServer(console, new ServerNBTManager(new File("."), name, true), name, dimension, seed, environment, generator); + + if (getWorld(internal.getUUID()) != null) { + worlds.remove(name); + System.out.println("World " + name + " is a duplicate of another world and has been prevented from loading. Please delete the uid.dat file from " + name + "'s world directory if you want to be able to load the duplicate world."); + return null; + } + internal.worldMaps = console.worlds.get(0).worldMaps; internal.tracker = new EntityTracker(console, dimension); |