mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
Potential bed API
Adds a new method to fetch the location of a player's bed without generating any sync loads. getPotentialBedLocation - Gets the last known location of a player's bed. This does not preform any check if the bed is still valid and does not load any chunks.
This commit is contained in:
parent
a23aa8c807
commit
5b74f31a52
1 changed files with 13 additions and 0 deletions
|
@ -308,6 +308,19 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||||
*/
|
*/
|
||||||
public int getSleepTicks();
|
public int getSleepTicks();
|
||||||
|
|
||||||
|
|
||||||
|
// Paper start - Potential bed api
|
||||||
|
/**
|
||||||
|
* Gets the Location of the player's bed, null if they have not slept
|
||||||
|
* in one. This method will not attempt to validate if the current bed
|
||||||
|
* is still valid.
|
||||||
|
*
|
||||||
|
* @return Bed Location if has slept in one, otherwise null.
|
||||||
|
*/
|
||||||
|
@Nullable
|
||||||
|
public Location getPotentialBedLocation();
|
||||||
|
// Paper end
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attempts to make the entity sleep at the given location.
|
* Attempts to make the entity sleep at the given location.
|
||||||
* <br>
|
* <br>
|
||||||
|
|
Loading…
Reference in a new issue