mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-04 10:11:29 +01:00
SPIGOT-7047: Add Player#getLastDeathLocation
By: Doc <nachito94@msn.com>
This commit is contained in:
parent
4834aca6ed
commit
a0619b4d67
2 changed files with 26 additions and 0 deletions
|
@ -366,4 +366,12 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
|
||||||
* for the statistic
|
* for the statistic
|
||||||
*/
|
*/
|
||||||
public void setStatistic(@NotNull Statistic statistic, @NotNull EntityType entityType, int newValue);
|
public void setStatistic(@NotNull Statistic statistic, @NotNull EntityType entityType, int newValue);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the player's last death location.
|
||||||
|
*
|
||||||
|
* @return the last death location if it exists, otherwise null.
|
||||||
|
*/
|
||||||
|
@Nullable
|
||||||
|
public Location getLastDeathLocation();
|
||||||
}
|
}
|
||||||
|
|
|
@ -568,4 +568,22 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||||
* @param ticks the amount of ticks to lose 1 health
|
* @param ticks the amount of ticks to lose 1 health
|
||||||
*/
|
*/
|
||||||
public void setStarvationRate(int ticks);
|
public void setStarvationRate(int ticks);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the player's last death location.
|
||||||
|
*
|
||||||
|
* @return the last death location if it exists, otherwise null.
|
||||||
|
*/
|
||||||
|
@Nullable
|
||||||
|
public Location getLastDeathLocation();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the player's last death location.
|
||||||
|
* <br>
|
||||||
|
* <b>Note:</b> This data is updated in the player's client only when the
|
||||||
|
* player respawns.
|
||||||
|
*
|
||||||
|
* @param location where to set the last death player location
|
||||||
|
*/
|
||||||
|
public void setLastDeathLocation(@Nullable Location location);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue