Archiviert
13
0

[Bleeding] Fix NPE with a null bedSpawnLocation. Fixes BUKKIT-1500

Dieser Commit ist enthalten in:
EdGruberman 2012-12-09 17:37:37 -06:00 committet von feildmaster
Ursprung 4d2a92ed47
Commit f18b3cdc76
2 geänderte Dateien mit 7 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -1094,6 +1094,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
} else {
this.c = null;
this.d = false;
this.spawnWorld = ""; // CraftBukkit
}
}

Datei anzeigen

@ -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) {