summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 88652161..0651ed60 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -286,4 +286,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return result;
}
+
+ public int getTicksLived() {
+ return getHandle().ticksLived;
+ }
+
+ public void setTicksLived(int value) {
+ if (value <= 0) {
+ throw new IllegalArgumentException("Age must be at least 1 tick");
+ }
+ getHandle().ticksLived = value;
+ }
}