Added setUpsideDown to PlayerWatcher

This commit is contained in:
libraryaddict 2020-05-10 16:38:36 +12:00
parent 71dbaeebf5
commit e8c7a48c47
No known key found for this signature in database
GPG Key ID: 052E4FBCD257AEA4
3 changed files with 9 additions and 5 deletions

@ -199,7 +199,7 @@ public class PlayerDisguise extends TargetedDisguise {
this.upsideDown = upsideDown;
if (isDisguiseInUse()) {
resendDisguise(getName(), true);
resendDisguise(DisguiseConfig.isArmorstandsName() ? getName() : "Dinnerbone", true);
} else {
scoreboardName = null;
}

@ -37,6 +37,14 @@ public class PlayerWatcher extends LivingWatcher {
((PlayerDisguise) getDisguise()).setNameVisible(nameVisible);
}
public boolean isUpsideDown() {
return ((PlayerDisguise) getDisguise()).isUpsideDown();
}
public void setUpsideDown(boolean upsideDown) {
((PlayerDisguise) getDisguise()).setUpsideDown(upsideDown);
}
@RandomDefaultValue
public String getName() {
return ((PlayerDisguise) getDisguise()).getName();

@ -145,10 +145,6 @@ public class ParamInfoManager {
if (watcherClass == PlayerWatcher.class) {
try {
methods.add(PlayerDisguise.class.getMethod("setDynamicName", boolean.class));
if (DisguiseConfig.isArmorstandsName()) {
methods.add(PlayerDisguise.class.getMethod("setUpsideDown", boolean.class));
}
}
catch (NoSuchMethodException e) {
e.printStackTrace();