Implements a World UID.

This commit is contained in:
Rigby
2011-07-05 04:48:27 +01:00
committed by EvilSeph
parent 5515ce1ff6
commit 9ced39421f
4 changed files with 42 additions and 3 deletions

View File

@@ -490,6 +490,16 @@ public final class CraftServer implements Server {
return worlds.get(name.toLowerCase());
}
public World getWorld(long uid) {
for (String worldName : worlds.keySet()) {
org.bukkit.World world = worlds.get(worldName);
if (world.getUID() == uid) {
return world;
}
}
return null;
}
public void addWorld(World world) {
worlds.put(world.getName().toLowerCase(), world);
}