mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-28 05:25:42 +01:00
Fixed NPE in CraftPlayer.getBedSpawnLocation
This commit is contained in:
parent
402e3c26e1
commit
8d49f500ec
@ -534,7 +534,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||||||
|
|
||||||
public Location getBedSpawnLocation() {
|
public Location getBedSpawnLocation() {
|
||||||
World world = getServer().getWorld(getHandle().spawnWorld);
|
World world = getServer().getWorld(getHandle().spawnWorld);
|
||||||
if (world != null) {
|
if ((world != null) && (getHandle().getBed() != null)) {
|
||||||
return new Location(world, getHandle().getBed().x, getHandle().getBed().y, getHandle().getBed().z);
|
return new Location(world, getHandle().getBed().x, getHandle().getBed().y, getHandle().getBed().z);
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user