public static boolean checkModifyPerms(LuckPermsPlugin plugin, Sender sender, CommandPermission base, Object target) {
        if (!plugin.getConfiguration().get(ConfigKeys.USE_ARGUMENT_BASED_COMMAND_PERMISSIONS)) {
            return false;
        }
        
        if (target instanceof User) {
            User targetUser = (User) target;
            
            if (targetUser.getUniqueId().equals(sender.getUniqueId())) {
                // the sender is trying to edit themselves
                Tristate state = sender.getPermissionValue(base.getPermission() + ".modify.self");
                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(USER_MODIFY_SELF);
                    return !globalState.asBoolean();
                }
            } else {
                // they're trying to edit another user
                Tristate state = sender.getPermissionValue(base.getPermission() + ".modify.others");
                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(USER_MODIFY_OTHERS);
                    return !globalState.asBoolean();
                }
            }
        } else if (target instanceof Group) {
            Group targetGroup = (Group) target;

            Tristate state = sender.getPermissionValue(base.getPermission() + ".modify." + targetGroup.getName());
            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(GROUP_MODIFY.apply(targetGroup.getName()));
                return !globalState.asBoolean();
            }
        } else if (target instanceof Track) {
            Track targetTrack = (Track) target;

            Tristate state = sender.getPermissionValue(base.getPermission() + ".modify." + targetTrack.getName());
            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(TRACK_MODIFY.apply(targetTrack.getName()));
                return !globalState.asBoolean();
            }
        } else {
            throw new IllegalStateException();
        }
    }
Checks if the sender has permission to modify the given target

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