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

        if (contextSet.isEmpty()) {
            Tristate state = sender.getPermissionValue(base.getPermission() + ".usecontext.global");
            if (state != Tristate.UNDEFINED) {
                return !state.asBoolean();
            } else {
                // fallback to the global perm if the one for the specific command is undefined
                Tristate globalState = sender.getPermissionValue(CONTEXT_USE_GLOBAL);
                return !globalState.asBoolean();
            }
        }

        for (Context context : contextSet) {
            Tristate state = sender.getPermissionValue(base.getPermission() + ".usecontext." + context.getKey() + "." + context.getValue());
            if (state != Tristate.UNDEFINED) {
                if (state == Tristate.FALSE) {
                    return true;
                }
            } else {
                // fallback to the global perm if the one for the specific command is undefined
                Tristate globalState = sender.getPermissionValue(CONTEXT_USE.apply(context.getKey(), context.getValue()));
                if (globalState == Tristate.FALSE) {
                    return true;
                }
            }
        }

        return false;
    }
Checks if the sender has permission to act within a given set of contexts

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