summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDinnerbone <dinnerbone@dinnerbone.com>2011-07-07 19:47:42 +0100
committerDinnerbone <dinnerbone@dinnerbone.com>2011-07-07 19:47:42 +0100
commit83abbfe4d659133320a2fbaf38501966ef6a7d3c (patch)
tree26caeac7c4283eaf9fca6e97d7f4834412f14295
parent4cab8635db4902e0c59cc318f81acf7b5e0b0ce0 (diff)
downloadcraftbukkit-83abbfe4d659133320a2fbaf38501966ef6a7d3c.tar
craftbukkit-83abbfe4d659133320a2fbaf38501966ef6a7d3c.tar.gz
craftbukkit-83abbfe4d659133320a2fbaf38501966ef6a7d3c.tar.lz
craftbukkit-83abbfe4d659133320a2fbaf38501966ef6a7d3c.tar.xz
craftbukkit-83abbfe4d659133320a2fbaf38501966ef6a7d3c.zip
Cleaned up this worlduid stuff a little.
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftServer.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index abca893e..536a34a5 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -393,7 +393,7 @@ public final class CraftServer implements Server {
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);
internal.worldMaps = console.worlds.get(0).worldMaps;
@@ -491,8 +491,7 @@ public final class CraftServer implements Server {
}
public World getWorld(long uid) {
- for (String worldName : worlds.keySet()) {
- org.bukkit.World world = worlds.get(worldName);
+ for (World world : worlds.values()) {
if (world.getUID() == uid) {
return world;
}