From 6760c07e6c3f8223a5229e6de7784038886746d9 Mon Sep 17 00:00:00 2001 From: Ben Date: Sun, 1 May 2016 10:16:20 +0100 Subject: [PATCH] Fix staff members getting stuck in both Incognito mode and the Hub Invisibility preference, and not being able to toggle either off them off because Incognito would stop Hub Invisibility from getting toggled (on OR off), and vice versa. --- .../core/incognito/commands/IncognitoToggleCommand.java | 6 +++--- .../core/preferences/ui/ExclusivePreferencesPage.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/incognito/commands/IncognitoToggleCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/incognito/commands/IncognitoToggleCommand.java index 83eefcdc9..e5f9fd142 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/incognito/commands/IncognitoToggleCommand.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/incognito/commands/IncognitoToggleCommand.java @@ -18,7 +18,7 @@ public class IncognitoToggleCommand extends CommandBase @Override public void Execute(Player caller, String[] args) { - if (Plugin.getPreferences().Get(caller).Invisibility) + if (Plugin.getPreferences().Get(caller).Invisibility && /* Hub Invis & Incognito stuck prevention */ !Plugin.Get(caller).Status) { UtilPlayer.message(caller, F.main("Incognito", "You are not allowed to toggle incognito on while Hub Invisibility is enabled.")); return; @@ -26,11 +26,11 @@ public class IncognitoToggleCommand extends CommandBase if (Plugin.toggle(caller)) { - UtilPlayer.message(caller, F.main("Incognito", "You are now incognito. Your status will only change when you run " + F.elem(AliasUsed) + " again.")); + UtilPlayer.message(caller, F.main("Incognito", "You are now incognito. Your status will only change when you run " + F.elem("/" + AliasUsed) + " again.")); } else { - UtilPlayer.message(caller, F.main("Incognito", "You are no longer incognito. Your status will only change when you run " + F.elem(AliasUsed) + " again.")); + UtilPlayer.message(caller, F.main("Incognito", "You are no longer incognito. Your status will only change when you run " + F.elem("/" + AliasUsed) + " again.")); } } } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/preferences/ui/ExclusivePreferencesPage.java b/Plugins/Mineplex.Core/src/mineplex/core/preferences/ui/ExclusivePreferencesPage.java index 75ae60395..77fde7f3d 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/preferences/ui/ExclusivePreferencesPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/preferences/ui/ExclusivePreferencesPage.java @@ -164,7 +164,7 @@ public class ExclusivePreferencesPage extends ShopPageBase