@Override
    public int compareTo(@NonNull ImmutableTreeNode o) {
        return (this.children != null) == o.getChildren().isPresent() ? 0 : this.children != null ? 1 : -1;
    }
Gets the node endings of each branch of the tree at this stage

The key represents the depth of the node.

@return the node endings
common/src/main/java/me/lucko/luckperms/common/treeview/ImmutableTreeNode.java