From f5c48eb264ee92e6243168c20189a854f15d5c44 Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 12 Nov 2013 16:35:22 +1300 Subject: [PATCH] Add isBaby and setBaby to ageable watcher --- .../disguisetypes/watchers/AgeableWatcher.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/me/libraryaddict/disguise/disguisetypes/watchers/AgeableWatcher.java b/src/me/libraryaddict/disguise/disguisetypes/watchers/AgeableWatcher.java index 7ee5f708..a79a65cb 100644 --- a/src/me/libraryaddict/disguise/disguisetypes/watchers/AgeableWatcher.java +++ b/src/me/libraryaddict/disguise/disguisetypes/watchers/AgeableWatcher.java @@ -9,12 +9,20 @@ public class AgeableWatcher extends LivingWatcher { } public boolean isAdult() { + return !isBaby(); + } + + public boolean isBaby() { return (Integer) getValue(12, 0) >= 0; } - public void setAdult(boolean isAdult) { - setValue(12, isAdult ? 0 : -24000); + public void setBaby(boolean isBaby) { + setValue(12, isBaby ? 0 : -24000); sendData(12); } + public void setAdult(boolean isAdult) { + setBaby(!isAdult); + } + }