mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-12-14 15:26:54 +01:00
Don't ignore config view self disguise option, fixes #502
This commit is contained in:
parent
695633e876
commit
9166120071
@ -837,7 +837,7 @@ public abstract class Disguise {
|
|||||||
* @return viewSelfDisguise
|
* @return viewSelfDisguise
|
||||||
*/
|
*/
|
||||||
public boolean isSelfDisguiseVisible() {
|
public boolean isSelfDisguiseVisible() {
|
||||||
return viewSelfDisguise;
|
return DisguiseConfig.isViewDisguises() && viewSelfDisguise;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSelfDisguiseVisible(boolean selfDisguiseVisible) {
|
public void setSelfDisguiseVisible(boolean selfDisguiseVisible) {
|
||||||
@ -1055,20 +1055,18 @@ public abstract class Disguise {
|
|||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public Disguise setViewSelfDisguise(boolean viewSelfDisguise) {
|
public Disguise setViewSelfDisguise(boolean viewSelfDisguise) {
|
||||||
if (viewSelfDisguise && !isTallDisguisesVisible()) {
|
if (isSelfDisguiseVisible() == viewSelfDisguise || !DisguiseConfig.isViewDisguises()) {
|
||||||
setTallDisguisesVisible(true);
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isSelfDisguiseVisible() != viewSelfDisguise) {
|
this.viewSelfDisguise = viewSelfDisguise;
|
||||||
this.viewSelfDisguise = viewSelfDisguise;
|
|
||||||
|
|
||||||
if (getEntity() != null && getEntity() instanceof Player) {
|
if (getEntity() != null && getEntity() instanceof Player) {
|
||||||
if (DisguiseAPI.getDisguise((Player) getEntity(), getEntity()) == this) {
|
if (DisguiseAPI.getDisguise((Player) getEntity(), getEntity()) == this) {
|
||||||
if (isSelfDisguiseVisible()) {
|
if (isSelfDisguiseVisible()) {
|
||||||
DisguiseUtilities.setupFakeDisguise(this);
|
DisguiseUtilities.setupFakeDisguise(this);
|
||||||
} else {
|
} else {
|
||||||
DisguiseUtilities.removeSelfDisguise(this);
|
DisguiseUtilities.removeSelfDisguise(this);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user