SPIGOT-6092: Player#setBedSpawnLocation - NullPointerException

By: Parker Hawke <hawkeboyz2@hotmail.com>
This commit is contained in:
CraftBukkit/Spigot 2020-08-22 17:42:15 +10:00
parent 886d2e1504
commit c87b44f451

View file

@ -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);
}