diff --git a/src/me/libraryaddict/disguise/disguisetypes/FlagWatcher.java b/src/me/libraryaddict/disguise/disguisetypes/FlagWatcher.java index 1cc2c388..0526a8cc 100644 --- a/src/me/libraryaddict/disguise/disguisetypes/FlagWatcher.java +++ b/src/me/libraryaddict/disguise/disguisetypes/FlagWatcher.java @@ -206,6 +206,31 @@ public class FlagWatcher { return getFlag(5); } + public String getCustomName() { + return (String) getValue(10, null); + } + + public boolean hasCustomName() { + return getCustomName() != null; + } + + public boolean isCustomNameVisible() { + return (Byte) getValue(11, (byte) 0) == 1; + } + + public void setCustomName(String name) { + if (name != null && name.length() > 64) { + name = name.substring(0, 64); + } + setValue(10, name); + sendData(10); + } + + public void setCustomNameVisible(boolean display) { + setValue(11, (byte) (display ? 1 : 0)); + sendData(11); + } + public boolean isRightClicking() { return getFlag(4); } diff --git a/src/me/libraryaddict/disguise/disguisetypes/watchers/LivingWatcher.java b/src/me/libraryaddict/disguise/disguisetypes/watchers/LivingWatcher.java index bb8649f7..d15c6395 100644 --- a/src/me/libraryaddict/disguise/disguisetypes/watchers/LivingWatcher.java +++ b/src/me/libraryaddict/disguise/disguisetypes/watchers/LivingWatcher.java @@ -69,10 +69,6 @@ public class LivingWatcher extends FlagWatcher { return clone; } - public String getCustomName() { - return (String) getValue(10, null); - } - public float getHealth() { return (Float) getValue(6, 0F); } @@ -115,18 +111,10 @@ public class LivingWatcher extends FlagWatcher { return (int) f1 << 16 | (int) f2 << 8 | (int) f3; } - public boolean hasCustomName() { - return getCustomName() != null; - } - public boolean hasPotionEffect(PotionEffectType type) { return potionEffects.contains(type.getId()); } - public boolean isCustomNameVisible() { - return (Byte) getValue(11, (byte) 0) == 1; - } - public boolean isMaxHealthSet() { return maxHealthSet; } @@ -148,19 +136,6 @@ public class LivingWatcher extends FlagWatcher { sendData(7); } - public void setCustomName(String name) { - if (name != null && name.length() > 64) { - name = name.substring(0, 64); - } - setValue(10, name); - sendData(10); - } - - public void setCustomNameVisible(boolean display) { - setValue(11, (byte) (display ? 1 : 0)); - sendData(11); - } - public void setHealth(float health) { setValue(6, health); sendData(6);