From 3e8532e6ff527e0da323f5eff254f7cff16cab6e Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 15 Nov 2013 14:18:50 +1300 Subject: [PATCH] Add the ability to set and get age in ageable watcher by number --- .../disguise/disguisetypes/watchers/AgeableWatcher.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/me/libraryaddict/disguise/disguisetypes/watchers/AgeableWatcher.java b/src/me/libraryaddict/disguise/disguisetypes/watchers/AgeableWatcher.java index aa346c1a..731de581 100644 --- a/src/me/libraryaddict/disguise/disguisetypes/watchers/AgeableWatcher.java +++ b/src/me/libraryaddict/disguise/disguisetypes/watchers/AgeableWatcher.java @@ -8,6 +8,10 @@ public class AgeableWatcher extends LivingWatcher { super(disguise); } + public int getAge() { + return (Integer) getValue(12, 0); + } + public boolean isAdult() { return !isBaby(); } @@ -20,6 +24,11 @@ public class AgeableWatcher extends LivingWatcher { setBaby(!isAdult); } + public void setAge(int newAge) { + setValue(12, newAge); + sendData(12); + } + public void setBaby(boolean isBaby) { setValue(12, isBaby ? -24000 : 0); sendData(12);