summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Adams <dinnerbone@dinnerbone.com>2011-10-11 02:23:10 +0100
committerNathan Adams <dinnerbone@dinnerbone.com>2011-10-11 02:23:10 +0100
commitaf1838305cbb1b1c79bb059d9399b8d0bcd73112 (patch)
treea217c7c083a5445935c62ac9ed427be87c564002
parentac0641887b05cc65fb92fbca22ed1c49f33295ea (diff)
downloadcraftbukkit-af1838305cbb1b1c79bb059d9399b8d0bcd73112.tar
craftbukkit-af1838305cbb1b1c79bb059d9399b8d0bcd73112.tar.gz
craftbukkit-af1838305cbb1b1c79bb059d9399b8d0bcd73112.tar.lz
craftbukkit-af1838305cbb1b1c79bb059d9399b8d0bcd73112.tar.xz
craftbukkit-af1838305cbb1b1c79bb059d9399b8d0bcd73112.zip
Implemented entity age methods
-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;
+ }
}