public void apply(LuckPermsPlugin plugin, Sender sender, WebEditorSession editorSession, String commandLabel, boolean ignoreSessionWarning) {
        String sessionId = this.payload.get("sessionId").getAsString();
        RemoteSession remoteSession = plugin.getWebEditorStore().sessions().getSession(sessionId);

        if (remoteSession == null) {
            // session is unknown
            if (!ignoreSessionWarning) {
                Message.APPLY_EDITS_SESSION_UNKNOWN.send(sender, this.id, commandLabel);
                return;
            }
        } else if (remoteSession.isCompleted()) {
            // session has been completed already
            if (!ignoreSessionWarning) {
                Message.APPLY_EDITS_SESSION_APPLIED_ALREADY.send(sender, this.id, commandLabel);
                return;
            }
        }

        ChangeApplier changeApplier = new ChangeApplier(plugin, sender, editorSession, remoteSession);
        boolean work = false;

        if (this.payload.has("changes")) {
            JsonArray changes = this.payload.get("changes").getAsJsonArray();
            for (JsonElement change : changes) {
                if (changeApplier.applyChange(change.getAsJsonObject())) {
                    work = true;
                }
            }
        }
        if (this.payload.has("userDeletions")) {
            JsonArray userDeletions = this.payload.get("userDeletions").getAsJsonArray();
            for (JsonElement userDeletion : userDeletions) {
                if (changeApplier.applyUserDelete(userDeletion)) {
                    work = true;
                }
            }
        }
        if (this.payload.has("groupDeletions")) {
            JsonArray groupDeletions = this.payload.get("groupDeletions").getAsJsonArray();
            for (JsonElement groupDeletion : groupDeletions) {
                if (changeApplier.applyGroupDelete(groupDeletion)) {
                    work = true;
                }
            }
        }
        if (this.payload.has("trackDeletions")) {
            JsonArray trackDeletions = this.payload.get("trackDeletions").getAsJsonArray();
            for (JsonElement trackDeletion : trackDeletions) {
                if (changeApplier.applyTrackDelete(trackDeletion)) {
                    work = true;
                }
            }
        }

        if (remoteSession != null) {
            remoteSession.complete();
        }

        if (!work) {
            Message.APPLY_EDITS_TARGET_NO_CHANGES_PRESENT.send(sender);
        }
    }
Applies the response to storage, sending appropriate informational messages to the sender.

@param plugin the plugin
@param sender the sender who is applying the session
common/src/main/java/me/lucko/luckperms/common/webeditor/WebEditorResponse.java