summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/EntityHuman.java
diff options
context:
space:
mode:
authorRigby <rigby@onarandombox.com>2011-06-16 04:24:31 +0100
committerEvilSeph <evilseph@unaligned.org>2011-06-17 01:00:19 -0400
commit0c56bfb62fb465cfe5c8b61d3584ff04893cd310 (patch)
tree31350975e39cf125d0c732ad40898cbad17b093d /src/main/java/net/minecraft/server/EntityHuman.java
parent7aadc3d666e7e67887eca5cbfafe7911aaf2ab11 (diff)
downloadcraftbukkit-0c56bfb62fb465cfe5c8b61d3584ff04893cd310.tar
craftbukkit-0c56bfb62fb465cfe5c8b61d3584ff04893cd310.tar.gz
craftbukkit-0c56bfb62fb465cfe5c8b61d3584ff04893cd310.tar.lz
craftbukkit-0c56bfb62fb465cfe5c8b61d3584ff04893cd310.tar.xz
craftbukkit-0c56bfb62fb465cfe5c8b61d3584ff04893cd310.zip
Possible Player.dat fixes to address issues with switching between Vanilla and Bukkit or vice versa.
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityHuman.java')
-rw-r--r--src/main/java/net/minecraft/server/EntityHuman.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 9d43ae5c..5b01faae 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -341,7 +341,13 @@ public abstract class EntityHuman extends EntityLiving {
this.a(true, true, false);
}
- this.spawnWorld = nbttagcompound.getString("SpawnWorld"); // CraftBukkit
+ // CraftBukkit - Start
+ this.spawnWorld = nbttagcompound.getString("SpawnWorld");
+ if (this.spawnWorld == "") {
+ CraftServer server = ((WorldServer) world).getServer();
+ this.spawnWorld = server.getWorlds().get(0).getName();
+ }
+ // CraftBukkit - End
if (nbttagcompound.hasKey("SpawnX") && nbttagcompound.hasKey("SpawnY") && nbttagcompound.hasKey("SpawnZ")) {
this.b = new ChunkCoordinates(nbttagcompound.e("SpawnX"), nbttagcompound.e("SpawnY"), nbttagcompound.e("SpawnZ"));