mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-24 19:46:21 +01:00
Try find conflicting UIDs
This commit is contained in:
parent
0993e6cbd1
commit
cc635ed51c
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user