diff --git a/bans-core/src/main/java/space/arim/libertybans/core/commands/extra/StandardArgumentParser.java b/bans-core/src/main/java/space/arim/libertybans/core/commands/extra/StandardArgumentParser.java index 2eeb5ac95..e183377a7 100644 --- a/bans-core/src/main/java/space/arim/libertybans/core/commands/extra/StandardArgumentParser.java +++ b/bans-core/src/main/java/space/arim/libertybans/core/commands/extra/StandardArgumentParser.java @@ -159,6 +159,8 @@ private MessagesConfig.All.NotFound notFound() { @Override public @Nullable R parseScope(CmdSender sender, CommandPackage command, ParseScope how) { + + boolean requirePermissions = configs.getScopeConfig().requirePermissions(); ServerScope explicitScope; String specificServer, category, rawScopeInput; @@ -176,7 +178,7 @@ private MessagesConfig.All.NotFound notFound() { } explicitScope = parsed.get(); } else { - if (!sender.hasPermission("libertybans.scope.default")) { + if (requirePermissions & !sender.hasPermission("libertybans.scope.default")) { sender.sendMessage(all().scopes().noPermissionForDefault()); return null; } @@ -189,7 +191,7 @@ private MessagesConfig.All.NotFound notFound() { case CATEGORY -> "category." + value; }; }); - if (!sender.hasPermission("libertybans.scope." + permissionSuffix)) { + if (requirePermissions && !sender.hasPermission("libertybans.scope." + permissionSuffix)) { sender.sendMessage(all().scopes().noPermission().replaceText("%SCOPE%", formatter.formatScope(explicitScope))); return null; }