Rename tall disguises thingy so its not so horrible to find, also have it turned off if they specifically turn self disguises on

This commit is contained in:
libraryaddict 2020-05-01 14:56:46 +12:00
parent 824edfe698
commit d1319f800c
No known key found for this signature in database
GPG Key ID: 052E4FBCD257AEA4
2 changed files with 8 additions and 4 deletions

View File

@ -99,7 +99,7 @@ public abstract class Disguise {
private boolean customName = true; private boolean customName = true;
@Getter @Getter
@Setter @Setter
private boolean hideTallSelfDisguise = DisguiseConfig.isHideTallSelfDisguises(); private boolean tallDisguisesVisible = !DisguiseConfig.isHideTallSelfDisguises();
public Disguise(DisguiseType disguiseType) { public Disguise(DisguiseType disguiseType) {
this.disguiseType = disguiseType; this.disguiseType = disguiseType;
@ -124,7 +124,7 @@ public abstract class Disguise {
protected void clone(Disguise disguise) { protected void clone(Disguise disguise) {
disguise.setDisguiseName(getDisguiseName()); disguise.setDisguiseName(getDisguiseName());
disguise.setCustomName(isCustomName()); disguise.setCustomName(isCustomName());
disguise.setHideTallSelfDisguise(isHideTallSelfDisguise()); disguise.setTallDisguisesVisible(isTallDisguisesVisible());
disguise.setReplaceSounds(isSoundsReplaced()); disguise.setReplaceSounds(isSoundsReplaced());
disguise.setViewSelfDisguise(isSelfDisguiseVisible()); disguise.setViewSelfDisguise(isSelfDisguiseVisible());
@ -549,7 +549,7 @@ public abstract class Disguise {
setupWatcher(); setupWatcher();
} }
if (getEntity() instanceof Player && isSelfDisguiseVisible() && isHideTallSelfDisguise() && if (getEntity() instanceof Player && isSelfDisguiseVisible() && isTallDisguisesVisible() &&
!getType().isCustom()) { !getType().isCustom()) {
DisguiseValues values = DisguiseValues.getDisguiseValues(getType()); DisguiseValues values = DisguiseValues.getDisguiseValues(getType());
@ -958,6 +958,10 @@ public abstract class Disguise {
*/ */
@Deprecated @Deprecated
public Disguise setViewSelfDisguise(boolean viewSelfDisguise) { public Disguise setViewSelfDisguise(boolean viewSelfDisguise) {
if (viewSelfDisguise && !isTallDisguisesVisible()) {
setTallDisguisesVisible(true);
}
if (isSelfDisguiseVisible() != viewSelfDisguise) { if (isSelfDisguiseVisible() != viewSelfDisguise) {
this.viewSelfDisguise = viewSelfDisguise; this.viewSelfDisguise = viewSelfDisguise;

View File

@ -114,7 +114,7 @@ public class ParamInfoManager {
// Add these last as it's what we want to present to be called the least // Add these last as it's what we want to present to be called the least
for (String methodName : new String[]{"setSelfDisguiseVisible", "setHideHeldItemFromSelf", for (String methodName : new String[]{"setSelfDisguiseVisible", "setHideHeldItemFromSelf",
"setHideArmorFromSelf", "setHearSelfDisguise", "setHidePlayer", "setExpires", "setNotifyBar", "setHideArmorFromSelf", "setHearSelfDisguise", "setHidePlayer", "setExpires", "setNotifyBar",
"setBossBarColor", "setBossBarStyle", "setHideTallSelfDisguise"}) { "setBossBarColor", "setBossBarStyle", "setTallDisguisesVisible"}) {
try { try {
Class cl = boolean.class; Class cl = boolean.class;