mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 12:42:05 -07:00
Rename getPotentialBedLocation to getPotentialRespawnLocation (#11950)
This commit is contained in:
@@ -453,9 +453,25 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
|||||||
* is still valid.
|
* is still valid.
|
||||||
*
|
*
|
||||||
* @return Bed Location if has slept in one, otherwise null.
|
* @return Bed Location if has slept in one, otherwise null.
|
||||||
|
* @see #getPotentialRespawnLocation()
|
||||||
|
* @deprecated Misleading name. This method also returns the location of
|
||||||
|
* respawn anchors.
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public Location getPotentialBedLocation();
|
@Deprecated(since = "1.21.4")
|
||||||
|
default Location getPotentialBedLocation() {
|
||||||
|
return this.getPotentialRespawnLocation();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the Location where the player will spawn at, null if they
|
||||||
|
* don't have a valid respawn point. This method will not attempt
|
||||||
|
* to validate if the current respawn location is still valid.
|
||||||
|
*
|
||||||
|
* @return respawn location if exists, otherwise null.
|
||||||
|
*/
|
||||||
|
@Nullable
|
||||||
|
Location getPotentialRespawnLocation();
|
||||||
// Paper end
|
// Paper end
|
||||||
// Paper start
|
// Paper start
|
||||||
/**
|
/**
|
||||||
|
@@ -154,7 +154,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
|||||||
|
|
||||||
// Paper start - Potential bed api
|
// Paper start - Potential bed api
|
||||||
@Override
|
@Override
|
||||||
public Location getPotentialBedLocation() {
|
public Location getPotentialRespawnLocation() {
|
||||||
ServerPlayer handle = (ServerPlayer) getHandle();
|
ServerPlayer handle = (ServerPlayer) getHandle();
|
||||||
BlockPos bed = handle.getRespawnPosition();
|
BlockPos bed = handle.getRespawnPosition();
|
||||||
if (bed == null) {
|
if (bed == null) {
|
||||||
|
Reference in New Issue
Block a user