Fix setting null respawn location

This commit is contained in:
md_5 2025-04-03 19:05:46 +11:00
parent 6c62d9fe88
commit ba251cc068
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -1189,7 +1189,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override @Override
public void setRespawnLocation(Location location, boolean override) { public void setRespawnLocation(Location location, boolean override) {
if (location == null) { if (location == null) {
getHandle().setRespawnPosition(new EntityPlayer.RespawnConfig(null, null, 0.0F, false), override, PlayerSpawnChangeEvent.Cause.PLUGIN); getHandle().setRespawnPosition(null, override, PlayerSpawnChangeEvent.Cause.PLUGIN);
} else { } else {
getHandle().setRespawnPosition(new EntityPlayer.RespawnConfig(((CraftWorld) location.getWorld()).getHandle().dimension(), CraftLocation.toBlockPosition(location), location.getYaw(), false), override, PlayerSpawnChangeEvent.Cause.PLUGIN); getHandle().setRespawnPosition(new EntityPlayer.RespawnConfig(((CraftWorld) location.getWorld()).getHandle().dimension(), CraftLocation.toBlockPosition(location), location.getYaw(), false), override, PlayerSpawnChangeEvent.Cause.PLUGIN);
} }