From 8b52a7666ed6b11446be7c5351df025f8297b8c0 Mon Sep 17 00:00:00 2001 From: Parker Hawke Date: Sat, 22 Aug 2020 17:42:15 +1000 Subject: [PATCH] SPIGOT-6092: Player#setBedSpawnLocation - NullPointerException --- src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 28613b3995..5d3b514e16 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -741,7 +741,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void setBedSpawnLocation(Location location, boolean override) { if (location == null) { - getHandle().setRespawnPosition(null, null, location.getYaw(), override, false); + getHandle().setRespawnPosition(null, null, 0.0F, override, false); } else { getHandle().setRespawnPosition(((CraftWorld) location.getWorld()).getHandle().getDimensionKey(), new BlockPosition(location.getBlockX(), location.getBlockY(), location.getBlockZ()), location.getYaw(), override, false); }