#966: Introduce getRespawnLocation as a replacement for getBedSpawnLocation

By: Nothixal <nothixal@gmail.com>
This commit is contained in:
Bukkit/Spigot
2024-01-22 20:27:07 +11:00
parent e0cee662c2
commit f11f3d9479
2 changed files with 55 additions and 0 deletions

View File

@@ -171,10 +171,24 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
* they have not slept in one or their current bed spawn is invalid.
*
* @return Bed Spawn Location if bed exists, otherwise null.
*
* @see #getRespawnLocation()
* @deprecated Misleading name. This method also returns the location of
* respawn anchors.
*/
@Nullable
@Deprecated
public Location getBedSpawnLocation();
/**
* Gets the Location where the player will spawn at, null if they
* don't have a valid respawn point.
*
* @return respawn location if exists, otherwise null.
*/
@Nullable
public Location getRespawnLocation();
/**
* Increments the given statistic for this player.
* <p>