Added setUpsideDown to PlayerWatcher
This commit is contained in:
parent
71dbaeebf5
commit
e8c7a48c47
@ -199,7 +199,7 @@ public class PlayerDisguise extends TargetedDisguise {
|
|||||||
this.upsideDown = upsideDown;
|
this.upsideDown = upsideDown;
|
||||||
|
|
||||||
if (isDisguiseInUse()) {
|
if (isDisguiseInUse()) {
|
||||||
resendDisguise(getName(), true);
|
resendDisguise(DisguiseConfig.isArmorstandsName() ? getName() : "Dinnerbone", true);
|
||||||
} else {
|
} else {
|
||||||
scoreboardName = null;
|
scoreboardName = null;
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,14 @@ public class PlayerWatcher extends LivingWatcher {
|
|||||||
((PlayerDisguise) getDisguise()).setNameVisible(nameVisible);
|
((PlayerDisguise) getDisguise()).setNameVisible(nameVisible);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isUpsideDown() {
|
||||||
|
return ((PlayerDisguise) getDisguise()).isUpsideDown();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpsideDown(boolean upsideDown) {
|
||||||
|
((PlayerDisguise) getDisguise()).setUpsideDown(upsideDown);
|
||||||
|
}
|
||||||
|
|
||||||
@RandomDefaultValue
|
@RandomDefaultValue
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return ((PlayerDisguise) getDisguise()).getName();
|
return ((PlayerDisguise) getDisguise()).getName();
|
||||||
|
@ -145,10 +145,6 @@ public class ParamInfoManager {
|
|||||||
if (watcherClass == PlayerWatcher.class) {
|
if (watcherClass == PlayerWatcher.class) {
|
||||||
try {
|
try {
|
||||||
methods.add(PlayerDisguise.class.getMethod("setDynamicName", boolean.class));
|
methods.add(PlayerDisguise.class.getMethod("setDynamicName", boolean.class));
|
||||||
|
|
||||||
if (DisguiseConfig.isArmorstandsName()) {
|
|
||||||
methods.add(PlayerDisguise.class.getMethod("setUpsideDown", boolean.class));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (NoSuchMethodException e) {
|
catch (NoSuchMethodException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
Loading…
Reference in New Issue
Block a user