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;
@Getter
@Setter
private boolean hideTallSelfDisguise = DisguiseConfig.isHideTallSelfDisguises();
private boolean tallDisguisesVisible = !DisguiseConfig.isHideTallSelfDisguises();
public Disguise(DisguiseType disguiseType) {
this.disguiseType = disguiseType;
@ -124,7 +124,7 @@ public abstract class Disguise {
protected void clone(Disguise disguise) {
disguise.setDisguiseName(getDisguiseName());
disguise.setCustomName(isCustomName());
disguise.setHideTallSelfDisguise(isHideTallSelfDisguise());
disguise.setTallDisguisesVisible(isTallDisguisesVisible());
disguise.setReplaceSounds(isSoundsReplaced());
disguise.setViewSelfDisguise(isSelfDisguiseVisible());
@ -549,7 +549,7 @@ public abstract class Disguise {
setupWatcher();
}
if (getEntity() instanceof Player && isSelfDisguiseVisible() && isHideTallSelfDisguise() &&
if (getEntity() instanceof Player && isSelfDisguiseVisible() && isTallDisguisesVisible() &&
!getType().isCustom()) {
DisguiseValues values = DisguiseValues.getDisguiseValues(getType());
@ -958,6 +958,10 @@ public abstract class Disguise {
*/
@Deprecated
public Disguise setViewSelfDisguise(boolean viewSelfDisguise) {
if (viewSelfDisguise && !isTallDisguisesVisible()) {
setTallDisguisesVisible(true);
}
if (isSelfDisguiseVisible() != 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
for (String methodName : new String[]{"setSelfDisguiseVisible", "setHideHeldItemFromSelf",
"setHideArmorFromSelf", "setHearSelfDisguise", "setHidePlayer", "setExpires", "setNotifyBar",
"setBossBarColor", "setBossBarStyle", "setHideTallSelfDisguise"}) {
"setBossBarColor", "setBossBarStyle", "setTallDisguisesVisible"}) {
try {
Class cl = boolean.class;