mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 03:43:40 +01:00
Fix NPE when getting bed spawn location.
By: feildmaster <admin@feildmaster.com>
This commit is contained in:
parent
88e050668f
commit
067842730b
1 changed files with 1 additions and 1 deletions
|
@ -610,7 +610,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||
World world = getServer().getWorld(getHandle().spawnWorld);
|
||||
ChunkCoordinates bed = getHandle().getBed();
|
||||
|
||||
if (world != null) {
|
||||
if (world != null && bed != null) {
|
||||
bed = EntityHuman.getBed(((CraftWorld) world).getHandle(), bed, getHandle().isRespawnForced());
|
||||
if (bed != null) {
|
||||
return new Location(world, bed.x, bed.y, bed.z);
|
||||
|
|
Loading…
Reference in a new issue