uuid changes

By: Tahg <tahgtahv@gmail.com>
This commit is contained in:
CraftBukkit/Spigot 2011-07-13 00:06:07 -04:00
parent 7a4e513ae4
commit 888de16db3
2 changed files with 7 additions and 4 deletions

View file

@ -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;
}
}

View file

@ -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