public static boolean checkArguments(LuckPermsPlugin plugin, Sender sender, CommandPermission base, String... args) {
        if (!plugin.getConfiguration().get(ConfigKeys.USE_ARGUMENT_BASED_COMMAND_PERMISSIONS)) {
            return false;
        }

        if (args.length == 0) {
            throw new IllegalStateException();
        }

        StringBuilder permission = new StringBuilder(base.getPermission());
        for (String arg : args) {
            permission.append(".").append(arg);
        }

        return !sender.hasPermission(permission.toString());
    }
Checks if the sender has permission to use the given arguments

@param plugin the plugin instance
@param sender the sender to check
@param base the base permission for the command
@param args the arguments the sender is trying to use
@return true if the sender should NOT be allowed to use the arguments, true if they should
common/src/main/java/me/lucko/luckperms/common/command/access/ArgumentPermissions.java