diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java index 67fd0dfc40..38e45dfb5e 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java @@ -297,6 +297,11 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa @Override public Location getBedSpawnLocation() { + return getRespawnLocation(); + } + + @Override + public Location getRespawnLocation() { NBTTagCompound data = getData(); if (data == null) return null; diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 8c3f4c05d9..8d50e4a646 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1008,6 +1008,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public Location getBedSpawnLocation() { + return getRespawnLocation(); + } + + @Override + public Location getRespawnLocation() { WorldServer world = getHandle().server.getLevel(getHandle().getRespawnDimension()); BlockPosition bed = getHandle().getRespawnPosition(); @@ -1026,8 +1031,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { setBedSpawnLocation(location, false); } + @Override + public void setRespawnLocation(Location location) { + setRespawnLocation(location, false); + } + @Override public void setBedSpawnLocation(Location location, boolean override) { + setRespawnLocation(location, override); + } + + @Override + public void setRespawnLocation(Location location, boolean override) { if (location == null) { getHandle().setRespawnPosition(null, null, 0.0F, override, false, PlayerSpawnChangeEvent.Cause.PLUGIN); } else {