Fix up notify bar
This commit is contained in:
@@ -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()) {
|
||||
|
@@ -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()) {
|
||||
|
@@ -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()) {
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user