@Override
    public void setPermission(@NonNull String name, boolean value) {
        Objects.requireNonNull(name, "name is null");
        Preconditions.checkArgument(!name.isEmpty(), "name is empty");

        String permission = name.toLowerCase(Locale.ROOT);

        Boolean previous = this.perms.put(permission, value);
        if (previous != null && previous == value) {
            return;
        }

        // if we're not hooked, then don't actually apply the change
        // it will get applied on hook - if that ever happens
        if (!this.hooked) {
            return;
        }

        if (previous != null) {
            unsetPermissionInternal(permission);
        }

        setPermissionInternal(permission, value);
    }
Hooks this attachment with the parent {@link User} instance.
bukkit/src/main/java/me/lucko/luckperms/bukkit/inject/permissible/LuckPermsPermissionAttachment.java