summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDinnerbone <dinnerbone@dinnerbone.com>2011-07-07 20:49:13 +0100
committerDinnerbone <dinnerbone@dinnerbone.com>2011-07-07 20:49:13 +0100
commitcc635ed51c8a98bbe2088115ca617c76cd7c730a (patch)
tree3ee0f6d6347c2999d23166224c73ec6f0ce66516
parent0993e6cbd19b2c4d183a1c93c5ff87320ef46faf (diff)
downloadcraftbukkit-cc635ed51c8a98bbe2088115ca617c76cd7c730a.tar
craftbukkit-cc635ed51c8a98bbe2088115ca617c76cd7c730a.tar.gz
craftbukkit-cc635ed51c8a98bbe2088115ca617c76cd7c730a.tar.lz
craftbukkit-cc635ed51c8a98bbe2088115ca617c76cd7c730a.tar.xz
craftbukkit-cc635ed51c8a98bbe2088115ca617c76cd7c730a.zip
Try find conflicting UIDs
-rw-r--r--src/main/java/net/minecraft/server/WorldData.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/WorldData.java b/src/main/java/net/minecraft/server/WorldData.java
index 292cb561..bef6a94f 100644
--- a/src/main/java/net/minecraft/server/WorldData.java
+++ b/src/main/java/net/minecraft/server/WorldData.java
@@ -1,6 +1,7 @@
package net.minecraft.server;
import java.util.List;
+import org.bukkit.Bukkit;
public class WorldData {
@@ -46,6 +47,10 @@ public class WorldData {
this.worldUID = (System.nanoTime() << 20) + this.a;
nbttagcompound.setLong("WorldUID", this.worldUID);
}
+
+ if (Bukkit.getServer().getWorld(worldUID) != null) {
+ throw new IllegalStateException("World '" + name + "' contains a conflicting UID with existing world. Please edit its level.dat and remove WorldUID, or delete its level.dat (and lose its seed/etc).");
+ }
// CraftBukkit end
}