Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 20:40:08 +01:00
Fix NPE when getting bed spawn location.
Dieser Commit ist enthalten in:
Ursprung
37975946a2
Commit
b4b7cacf5e
@ -610,7 +610,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||||||
World world = getServer().getWorld(getHandle().spawnWorld);
|
World world = getServer().getWorld(getHandle().spawnWorld);
|
||||||
ChunkCoordinates bed = getHandle().getBed();
|
ChunkCoordinates bed = getHandle().getBed();
|
||||||
|
|
||||||
if (world != null) {
|
if (world != null && bed != null) {
|
||||||
bed = EntityHuman.getBed(((CraftWorld) world).getHandle(), bed, getHandle().isRespawnForced());
|
bed = EntityHuman.getBed(((CraftWorld) world).getHandle(), bed, getHandle().isRespawnForced());
|
||||||
if (bed != null) {
|
if (bed != null) {
|
||||||
return new Location(world, bed.x, bed.y, bed.z);
|
return new Location(world, bed.x, bed.y, bed.z);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren