mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-04 02:01:44 +01:00
SPIGOT-6092: Player#setBedSpawnLocation - NullPointerException
This commit is contained in:
parent
fe4efd19f5
commit
8b52a7666e
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue