geforkt von Mirrors/Paper
[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 {
|
} else {
|
||||||
this.c = null;
|
this.c = null;
|
||||||
this.d = false;
|
this.d = false;
|
||||||
|
this.spawnWorld = ""; // CraftBukkit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -614,9 +614,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setBedSpawnLocation(Location location, boolean override) {
|
public void setBedSpawnLocation(Location location, boolean override) {
|
||||||
|
if (location == null) {
|
||||||
|
getHandle().setRespawnPosition(null, override);
|
||||||
|
} else {
|
||||||
getHandle().setRespawnPosition(new ChunkCoordinates(location.getBlockX(), location.getBlockY(), location.getBlockZ()), override);
|
getHandle().setRespawnPosition(new ChunkCoordinates(location.getBlockX(), location.getBlockY(), location.getBlockZ()), override);
|
||||||
getHandle().spawnWorld = location.getWorld().getName();
|
getHandle().spawnWorld = location.getWorld().getName();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void hidePlayer(Player player) {
|
public void hidePlayer(Player player) {
|
||||||
Validate.notNull(player, "hidden player cannot be null");
|
Validate.notNull(player, "hidden player cannot be null");
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren