1
0
mirror of https://github.com/PaperMC/Paper.git synced 2025-04-08 21:16:30 +02:00

Cleaned up this worlduid stuff a little.

By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
CraftBukkit/Spigot 2011-07-07 19:47:42 +01:00
parent 034b084e7c
commit 7c3ca1d44c

View File

@ -393,7 +393,7 @@ public final class CraftServer implements Server {
converter.convert(name, new ConvertProgressUpdater(console)); converter.convert(name, new ConvertProgressUpdater(console));
} }
int dimension = 10 + console.worlds.size(); int dimension = Environment.values().length + 1 + console.worlds.size();
WorldServer internal = new WorldServer(console, new ServerNBTManager(new File("."), name, true), name, dimension, seed, environment, generator); WorldServer internal = new WorldServer(console, new ServerNBTManager(new File("."), name, true), name, dimension, seed, environment, generator);
internal.worldMaps = console.worlds.get(0).worldMaps; internal.worldMaps = console.worlds.get(0).worldMaps;
@ -491,8 +491,7 @@ public final class CraftServer implements Server {
} }
public World getWorld(long uid) { public World getWorld(long uid) {
for (String worldName : worlds.keySet()) { for (World world : worlds.values()) {
org.bukkit.World world = worlds.get(worldName);
if (world.getUID() == uid) { if (world.getUID() == uid) {
return world; return world;
} }