mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 12:13:54 -07:00
[Bleeding] Fix NPE in getBedSpawnLocation. Fixes BUKKIT-1949
This commit is contained in:
@@ -198,6 +198,8 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
|
||||
|
||||
public Location getBedSpawnLocation() {
|
||||
NBTTagCompound data = getData();
|
||||
if (data == null) return null;
|
||||
|
||||
if (data.hasKey("SpawnX") && data.hasKey("SpawnY") && data.hasKey("SpawnZ")) {
|
||||
String spawnWorld = data.getString("SpawnWorld");
|
||||
if (spawnWorld.equals("")) {
|
||||
|
Reference in New Issue
Block a user