private Difference<Node> applyNodeChanges(PermissionHolder holder, Set<Node> nodes) {
            if (this.remoteSession != null) {

                WebEditorRequest request = this.remoteSession.request();
                if (request != null) {

                    List<Node> nodesBefore = request.getHolders().get(holder.getIdentifier());
                    if (nodesBefore != null) {

                        // if the initial data sent to the remote session is still known
                        // use that to calculate a diff of the changes made to avoid overriding
                        // modified/added/removed nodes since the editor session was created
                        Difference<Node> diff = new Difference<>();
                        diff.recordChanges(Difference.ChangeType.REMOVE, nodesBefore);
                        diff.recordChanges(Difference.ChangeType.ADD, nodes);

                        return holder.setNodes(DataType.NORMAL, diff, true);
                    }
                }
            }

            return holder.setNodes(DataType.NORMAL, nodes, true);
        }
Represents the application of a given editor session on this platform.
common/src/main/java/me/lucko/luckperms/common/webeditor/WebEditorResponse.java