From 999db397ecc6042f940aafdf7d7191538ca76312 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sat, 7 Sep 2019 16:48:23 +1000 Subject: [PATCH] Add API to get/set inhabited time of a Chunk By: md_5 --- paper-api/src/main/java/org/bukkit/Chunk.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/Chunk.java b/paper-api/src/main/java/org/bukkit/Chunk.java index 58cf0dde77..75981fe694 100644 --- a/paper-api/src/main/java/org/bukkit/Chunk.java +++ b/paper-api/src/main/java/org/bukkit/Chunk.java @@ -198,4 +198,20 @@ public interface Chunk { */ @NotNull Collection getPluginChunkTickets(); + + /** + * Gets the amount of time in ticks that this chunk has been inhabited. + * + * Note that the time is incremented once per tick per player in the chunk. + * + * @return inhabited time + */ + long getInhabitedTime(); + + /** + * Sets the amount of time in ticks that this chunk has been inhabited. + * + * @param ticks new inhabited time + */ + void setInhabitedTime(long ticks); }