Gui permission semantic changes under certain conditions

This commit is contained in:
Esophose 2019-07-16 02:00:47 -06:00
parent 063de34095
commit 795da31e8f
2 changed files with 6 additions and 8 deletions

View file

@ -39,7 +39,7 @@ public class DefaultCommandModule implements CommandModule {
}
public boolean requiresEffects() {
return true;
return false;
}
public boolean canConsoleExecute() {

View file

@ -27,14 +27,12 @@ public class GUICommandModule implements CommandModule {
}
return;
}
if (PSetting.GUI_PRESETS_ONLY.getBoolean() && ParticleGroupPresetManager.getPresetGroupsForPlayer(pplayer.getPlayer()).isEmpty()) {
return;
} else if (PermissionManager.getEffectNamesUserHasPermissionFor(pplayer.getPlayer()).isEmpty()) {
if (!PSetting.GUI_PRESETS_ONLY.getBoolean() && PermissionManager.getEffectNamesUserHasPermissionFor(pplayer.getPlayer()).isEmpty()) {
if (byDefault) {
LangManager.sendMessage(pplayer, Lang.COMMAND_ERROR_UNKNOWN);
} else {
LangManager.sendMessage(pplayer, Lang.COMMAND_ERROR_NO_EFFECTS);
} else {
LangManager.sendMessage(pplayer, Lang.COMMAND_ERROR_UNKNOWN);
}
return;
}
@ -59,7 +57,7 @@ public class GUICommandModule implements CommandModule {
}
public boolean requiresEffects() {
return true;
return false;
}
public boolean canConsoleExecute() {