From ef674c0b8371590f77fdc303d2784a7fd4941f06 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Tue, 11 Oct 2011 02:22:38 +0100 Subject: [PATCH] Added new entity.get/setTicksLived for identifying an entity's age By: Nathan Adams --- .../main/java/org/bukkit/entity/Entity.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/entity/Entity.java b/paper-api/src/main/java/org/bukkit/entity/Entity.java index 5fa4ee10bc..9b0ab70f38 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Entity.java +++ b/paper-api/src/main/java/org/bukkit/entity/Entity.java @@ -173,4 +173,23 @@ public interface Entity { * @return unique id */ public UUID getUniqueId(); + + /** + * Gets the amount of ticks this entity has lived for. + *

+ * This is the equivalent to "age" in entities. + * + * @return Age of entity + */ + public int getTicksLived(); + + /** + * Sets the amount of ticks this entity has lived for. + *

+ * This is the equivalent to "age" in entities. May not be + * less than one tick. + * + * @param value Age of entity + */ + public void setTicksLived(int value); }