Fix toggle of self disguises, fixes #566
This commit is contained in:
parent
bde28a6521
commit
4e22d92b5e
@ -184,7 +184,7 @@ public class DisguiseAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// They prefer to have the opposite of whatever the view disguises option is
|
// They prefer to have the opposite of whatever the view disguises option is
|
||||||
if (hasSelfDisguisePreference(entity) && disguise.isSelfDisguiseVisible() == DisguiseConfig.isViewDisguises()) {
|
if (hasSelfDisguisePreference(entity) && disguise.isSelfDisguiseVisible() == DisguiseConfig.isViewSelfDisguisesDefault()) {
|
||||||
disguise.setViewSelfDisguise(!disguise.isSelfDisguiseVisible());
|
disguise.setViewSelfDisguise(!disguise.isSelfDisguiseVisible());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -400,7 +400,7 @@ public class DisguiseAPI {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static boolean isViewSelfToggled(Entity entity) {
|
public static boolean isViewSelfToggled(Entity entity) {
|
||||||
return hasSelfDisguisePreference(entity) != DisguiseConfig.isViewDisguises();
|
return hasSelfDisguisePreference(entity) != DisguiseConfig.isViewSelfDisguisesDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -462,7 +462,7 @@ public class DisguiseAPI {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!canSeeSelfDisguises == DisguiseConfig.isViewDisguises()) {
|
if (!canSeeSelfDisguises == DisguiseConfig.isViewSelfDisguisesDefault()) {
|
||||||
if (!hasSelfDisguisePreference(entity)) {
|
if (!hasSelfDisguisePreference(entity)) {
|
||||||
DisguiseUtilities.getViewSelf().add(entity.getUniqueId());
|
DisguiseUtilities.getViewSelf().add(entity.getUniqueId());
|
||||||
DisguiseUtilities.addSaveAttempt();
|
DisguiseUtilities.addSaveAttempt();
|
||||||
|
@ -71,7 +71,7 @@ public class DisguiseCommand extends DisguiseBaseCommand implements TabCompleter
|
|||||||
|
|
||||||
if (!setViewDisguise(args)) {
|
if (!setViewDisguise(args)) {
|
||||||
// They prefer to have the opposite of whatever the view disguises option is
|
// They prefer to have the opposite of whatever the view disguises option is
|
||||||
if (DisguiseAPI.hasSelfDisguisePreference(disguise.getEntity()) && disguise.isSelfDisguiseVisible() == DisguiseConfig.isViewDisguises()) {
|
if (DisguiseAPI.hasSelfDisguisePreference(disguise.getEntity()) && disguise.isSelfDisguiseVisible() == DisguiseConfig.isViewSelfDisguisesDefault()) {
|
||||||
disguise.setViewSelfDisguise(!disguise.isSelfDisguiseVisible());
|
disguise.setViewSelfDisguise(!disguise.isSelfDisguiseVisible());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,7 @@ public class DisguisePlayerCommand extends DisguiseBaseCommand implements TabCom
|
|||||||
|
|
||||||
if (!setViewDisguise(args)) {
|
if (!setViewDisguise(args)) {
|
||||||
// They prefer to have the opposite of whatever the view disguises option is
|
// They prefer to have the opposite of whatever the view disguises option is
|
||||||
if (DisguiseAPI.hasSelfDisguisePreference(disguise.getEntity()) && disguise.isSelfDisguiseVisible() == DisguiseConfig.isViewDisguises()) {
|
if (DisguiseAPI.hasSelfDisguisePreference(disguise.getEntity()) && disguise.isSelfDisguiseVisible() == DisguiseConfig.isViewSelfDisguisesDefault()) {
|
||||||
disguise.setViewSelfDisguise(!disguise.isSelfDisguiseVisible());
|
disguise.setViewSelfDisguise(!disguise.isSelfDisguiseVisible());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -189,7 +189,7 @@ public class DisguiseRadiusCommand extends DisguiseBaseCommand implements TabCom
|
|||||||
|
|
||||||
if (!setViewDisguise(args)) {
|
if (!setViewDisguise(args)) {
|
||||||
// They prefer to have the opposite of whatever the view disguises option is
|
// They prefer to have the opposite of whatever the view disguises option is
|
||||||
if (DisguiseAPI.hasSelfDisguisePreference(disguise.getEntity()) && disguise.isSelfDisguiseVisible() == DisguiseConfig.isViewDisguises()) {
|
if (DisguiseAPI.hasSelfDisguisePreference(disguise.getEntity()) && disguise.isSelfDisguiseVisible() == DisguiseConfig.isViewSelfDisguisesDefault()) {
|
||||||
disguise.setViewSelfDisguise(!disguise.isSelfDisguiseVisible());
|
disguise.setViewSelfDisguise(!disguise.isSelfDisguiseVisible());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user