summaryrefslogtreecommitdiffstats
path: root/src/main/java/net
diff options
context:
space:
mode:
authorDinnerbone <dinnerbone@dinnerbone.com>2011-02-07 01:10:55 +0000
committerDinnerbone <dinnerbone@dinnerbone.com>2011-02-07 01:51:06 +0000
commit7a71347cdfec29433cd7c6d21f9a2450af9e52e7 (patch)
tree6b811d5cdc92229c576648ae1a5a2819a7b530e9 /src/main/java/net
parent3f8d9c0e1f58bffbab4b72d4649657ce45a2bf6b (diff)
downloadcraftbukkit-7a71347cdfec29433cd7c6d21f9a2450af9e52e7.tar
craftbukkit-7a71347cdfec29433cd7c6d21f9a2450af9e52e7.tar.gz
craftbukkit-7a71347cdfec29433cd7c6d21f9a2450af9e52e7.tar.lz
craftbukkit-7a71347cdfec29433cd7c6d21f9a2450af9e52e7.tar.xz
craftbukkit-7a71347cdfec29433cd7c6d21f9a2450af9e52e7.zip
Fixed logging into the correct world
Diffstat (limited to 'src/main/java/net')
-rw-r--r--src/main/java/net/minecraft/server/Entity.java15
-rw-r--r--src/main/java/net/minecraft/server/ServerConfigurationManager.java6
2 files changed, 20 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 5a58da0e..fa74527a 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -809,6 +809,7 @@ public abstract class Entity {
nbttagcompound.a("Fire", (short) this.fireTicks);
nbttagcompound.a("Air", (short) this.airTicks);
nbttagcompound.a("OnGround", this.onGround);
+ nbttagcompound.a("World", world.w); // Craftbukkit
this.a(nbttagcompound);
}
@@ -830,6 +831,20 @@ public abstract class Entity {
this.fireTicks = nbttagcompound.c("Fire");
this.airTicks = nbttagcompound.c("Air");
this.onGround = nbttagcompound.l("OnGround");
+
+ // Craftbukkit start
+ if (nbttagcompound.a("World")) {
+ String worldName = nbttagcompound.h("World");
+
+ for (WorldServer world : ((WorldServer)this.world).getServer().getServer().worlds) {
+ if (world.w.equals(worldName)) {
+ this.world = world;
+ break;
+ }
+ }
+ }
+ // Craftbukkit end
+
this.a(this.locX, this.locY, this.locZ);
this.b(nbttagcompound);
}
diff --git a/src/main/java/net/minecraft/server/ServerConfigurationManager.java b/src/main/java/net/minecraft/server/ServerConfigurationManager.java
index 4e725672..70e3ea39 100644
--- a/src/main/java/net/minecraft/server/ServerConfigurationManager.java
+++ b/src/main/java/net/minecraft/server/ServerConfigurationManager.java
@@ -65,7 +65,11 @@ public class ServerConfigurationManager {
}
public void a(WorldServer worldserver) {
- this.l = new PlayerNBTManager(new File(worldserver.t, "players"));
+ // Craftbukkit start
+ if (this.l == null) {
+ this.l = new PlayerNBTManager(new File(worldserver.t, "players"));
+ }
+ // Craftbukkit end
}
public int a() {