Fix inconsistencies between offline/online spawn position getter (#11960)
This commit is contained in:
@@ -545,6 +545,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
public boolean isSleepingIgnored();
|
||||
|
||||
/**
|
||||
* Gets the Location where the player will spawn at, {@code null} if they
|
||||
* don't have a valid respawn point.
|
||||
* <br>
|
||||
* Unlike offline players, the location if found will be loaded to validate by default.
|
||||
*
|
||||
* @return respawn location if exists, otherwise {@code null}.
|
||||
* @see #getRespawnLocation(boolean) for more fine-grained control over chunk loading and validation behaviour.
|
||||
*/
|
||||
@Override
|
||||
default @Nullable Location getRespawnLocation() {
|
||||
return this.getRespawnLocation(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the Location where the player will spawn at their bed.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user