3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-16 21:10:17 +01:00

[Bleeding] Fix NPE in getBedSpawnLocation. Fixes BUKKIT-1949

Dieser Commit ist enthalten in:
EdGruberman 2012-07-24 21:23:33 -07:00 committet von feildmaster
Ursprung 090c1a60bd
Commit 24abdd556d

Datei anzeigen

@ -198,6 +198,8 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
public Location getBedSpawnLocation() { public Location getBedSpawnLocation() {
NBTTagCompound data = getData(); NBTTagCompound data = getData();
if (data == null) return null;
if (data.hasKey("SpawnX") && data.hasKey("SpawnY") && data.hasKey("SpawnZ")) { if (data.hasKey("SpawnX") && data.hasKey("SpawnY") && data.hasKey("SpawnZ")) {
String spawnWorld = data.getString("SpawnWorld"); String spawnWorld = data.getString("SpawnWorld");
if (spawnWorld.equals("")) { if (spawnWorld.equals("")) {