SPIGOT-6092: Player#setBedSpawnLocation - NullPointerException

This commit is contained in:
Parker Hawke 2020-08-22 17:42:15 +10:00 committed by md_5
parent fe4efd19f5
commit 8b52a7666e
No known key found for this signature in database
GPG key ID: E8E901AC7C617C11

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