diff options
author | Nathan Adams <dinnerbone@dinnerbone.com> | 2011-10-11 02:23:10 +0100 |
---|---|---|
committer | Nathan Adams <dinnerbone@dinnerbone.com> | 2011-10-11 02:23:10 +0100 |
commit | af1838305cbb1b1c79bb059d9399b8d0bcd73112 (patch) | |
tree | a217c7c083a5445935c62ac9ed427be87c564002 | |
parent | ac0641887b05cc65fb92fbca22ed1c49f33295ea (diff) | |
download | craftbukkit-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.java | 11 |
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; + } } |