From d0f904fc50c7301ead51634f8f774664e4a707b0 Mon Sep 17 00:00:00 2001 From: Tahg Date: Wed, 13 Jul 2011 00:06:07 -0400 Subject: uuid changes --- src/main/java/org/bukkit/craftbukkit/CraftServer.java | 5 +++-- src/main/java/org/bukkit/craftbukkit/CraftWorld.java | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'src/main/java/org/bukkit') diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index 00101170..f50b13e9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -24,6 +24,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Random; +import java.util.UUID; import java.util.logging.Level; import java.util.logging.Logger; import jline.ConsoleReader; @@ -494,9 +495,9 @@ public final class CraftServer implements Server { return worlds.get(name.toLowerCase()); } - public World getWorld(long uid) { + public World getWorld(UUID uid) { for (World world : worlds.values()) { - if (world.getUID() == uid) { + if (world.getUID().equals(uid)) { return world; } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index fac24e3e..7170a9be 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -8,6 +8,8 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Random; +import java.util.UUID; + import net.minecraft.server.*; import org.bukkit.entity.Arrow; @@ -400,8 +402,8 @@ public class CraftWorld implements World { return world.worldData.getSeed(); } - public long getUID() { - return world.worldData.getWorldUID(); + public UUID getUID() { + return world.getUUID(); } @Override -- cgit v1.2.3