Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-16 21:10:17 +01:00
[Bleeding] Fix NPE with a null bedSpawnLocation. Fixes BUKKIT-1500
Dieser Commit ist enthalten in:
Ursprung
4d2a92ed47
Commit
f18b3cdc76
@ -1094,6 +1094,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
} else {
|
||||
this.c = null;
|
||||
this.d = false;
|
||||
this.spawnWorld = ""; // CraftBukkit
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -614,8 +614,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
public void setBedSpawnLocation(Location location, boolean override) {
|
||||
getHandle().setRespawnPosition(new ChunkCoordinates(location.getBlockX(), location.getBlockY(), location.getBlockZ()), override);
|
||||
getHandle().spawnWorld = location.getWorld().getName();
|
||||
if (location == null) {
|
||||
getHandle().setRespawnPosition(null, override);
|
||||
} else {
|
||||
getHandle().setRespawnPosition(new ChunkCoordinates(location.getBlockX(), location.getBlockY(), location.getBlockZ()), override);
|
||||
getHandle().spawnWorld = location.getWorld().getName();
|
||||
}
|
||||
}
|
||||
|
||||
public void hidePlayer(Player player) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren