From b2adbb451fd8f5d877bea9650c4320bb3962f2d9 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 7 Sep 2019 16:48:23 +1000 Subject: [PATCH] Add API to get/set inhabited time of a Chunk --- src/main/java/org/bukkit/Chunk.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/java/org/bukkit/Chunk.java b/src/main/java/org/bukkit/Chunk.java index 58cf0dde..75981fe6 100644 --- a/src/main/java/org/bukkit/Chunk.java +++ b/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); }