diff --git a/paper-api/src/main/java/org/bukkit/OfflinePlayer.java b/paper-api/src/main/java/org/bukkit/OfflinePlayer.java index 76e511e7f6..c5eed3234a 100644 --- a/paper-api/src/main/java/org/bukkit/OfflinePlayer.java +++ b/paper-api/src/main/java/org/bukkit/OfflinePlayer.java @@ -366,4 +366,12 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio * for the statistic */ 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(); } diff --git a/paper-api/src/main/java/org/bukkit/entity/HumanEntity.java b/paper-api/src/main/java/org/bukkit/entity/HumanEntity.java index 50ac6f0374..2cf43eac30 100644 --- a/paper-api/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/paper-api/src/main/java/org/bukkit/entity/HumanEntity.java @@ -568,4 +568,22 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder * @param ticks the amount of ticks to lose 1 health */ 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. + *
+ * Note: 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); }