SPIGOT-6092: Player#setBedSpawnLocation - NullPointerException
This commit is contained in:
parent
fe4efd19f5
commit
8b52a7666e
@ -741,7 +741,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||||||
@Override
|
@Override
|
||||||
public void setBedSpawnLocation(Location location, boolean override) {
|
public void setBedSpawnLocation(Location location, boolean override) {
|
||||||
if (location == null) {
|
if (location == null) {
|
||||||
getHandle().setRespawnPosition(null, null, location.getYaw(), override, false);
|
getHandle().setRespawnPosition(null, null, 0.0F, override, false);
|
||||||
} else {
|
} else {
|
||||||
getHandle().setRespawnPosition(((CraftWorld) location.getWorld()).getHandle().getDimensionKey(), new BlockPosition(location.getBlockX(), location.getBlockY(), location.getBlockZ()), location.getYaw(), override, false);
|
getHandle().setRespawnPosition(((CraftWorld) location.getWorld()).getHandle().getDimensionKey(), new BlockPosition(location.getBlockX(), location.getBlockY(), location.getBlockZ()), location.getYaw(), override, false);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user