summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/net/minecraft/server/EntityHuman.java1
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java8
2 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 64abd730..1e5723d3 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -1094,6 +1094,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
} else {
this.c = null;
this.d = false;
+ this.spawnWorld = ""; // CraftBukkit
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index efa4e05a..3c1ff730 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -614,8 +614,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
public void setBedSpawnLocation(Location location, boolean override) {
- getHandle().setRespawnPosition(new ChunkCoordinates(location.getBlockX(), location.getBlockY(), location.getBlockZ()), override);
- getHandle().spawnWorld = location.getWorld().getName();
+ if (location == null) {
+ getHandle().setRespawnPosition(null, override);
+ } else {
+ getHandle().setRespawnPosition(new ChunkCoordinates(location.getBlockX(), location.getBlockY(), location.getBlockZ()), override);
+ getHandle().spawnWorld = location.getWorld().getName();
+ }
}
public void hidePlayer(Player player) {