Fix up notify bar

This commit is contained in:
libraryaddict
2020-07-03 23:45:48 +12:00
parent e74df537bb
commit b5b9b432f7
7 changed files with 41 additions and 16 deletions

View File

@@ -74,6 +74,10 @@ public class DisguiseCommand extends DisguiseBaseCommand implements TabCompleter
disguise.setViewSelfDisguise(!disguise.isSelfDisguiseVisible());
}
if (!DisguiseAPI.isActionBarShown(disguise.getEntity())) {
disguise.setNotifyBar(DisguiseConfig.NotifyBar.NONE);
}
disguise.startDisguise();
if (disguise.isDisguiseInUse()) {

View File

@@ -116,6 +116,10 @@ public class DisguisePlayerCommand extends DisguiseBaseCommand implements TabCom
disguise.setViewSelfDisguise(!disguise.isSelfDisguiseVisible());
}
if (!DisguiseAPI.isActionBarShown(disguise.getEntity())) {
disguise.setNotifyBar(DisguiseConfig.NotifyBar.NONE);
}
disguise.startDisguise();
if (disguise.isDisguiseInUse()) {

View File

@@ -194,6 +194,10 @@ public class DisguiseRadiusCommand extends DisguiseBaseCommand implements TabCom
disguise.setViewSelfDisguise(!disguise.isSelfDisguiseVisible());
}
if (!DisguiseAPI.isActionBarShown(disguise.getEntity())) {
disguise.setNotifyBar(DisguiseConfig.NotifyBar.NONE);
}
disguise.startDisguise();
if (disguise.isDisguiseInUse()) {

View File

@@ -21,11 +21,11 @@ public class DisguiseViewBarCommand implements CommandExecutor {
Player player = (Player) sender;
if (DisguiseAPI.isViewBarToggled(player)) {
DisguiseAPI.setViewBarToggled(player, false);
if (DisguiseAPI.isActionBarShown(player)) {
DisguiseAPI.setActionBarShown(player, false);
DisguiseUtilities.sendMessage(sender, LibsMsg.VIEW_BAR_OFF);
} else {
DisguiseAPI.setViewBarToggled(player, true);
DisguiseAPI.setActionBarShown(player, true);
DisguiseUtilities.sendMessage(sender, LibsMsg.VIEW_BAR_ON);
}