Java Code Examples for ninja.leaping.configurate.ConfigurationNode#getPath()

The following examples show how to use ninja.leaping.configurate.ConfigurationNode#getPath() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ConfigTabControl.java    From ChatUI with MIT License 6 votes vote down vote up
ConfigTabControl(ConfigEditTab tab, ConfigurationNode rootNode, ConfigEditTab.Options options, ConfigEditTab.ActionHandler handler) {
    this.tab = tab;
    this.currentNode = rootNode;
    updateEntryList(rootNode);
    ConfigurationNode parent = rootNode.getParent();
    Object[] ignore;
    if (parent == null) {
        ignore = new Object[0];
    } else {
        ignore = parent.getPath();
        if (ignore.length == 1 && ignore[0] == null) {
            ignore = new Object[0];
        }
    }
    this.ignoredPath = ignore;
    this.options = options;
    this.handler = handler;
}
 
Example 2
Source File: ConfigUtils.java    From BlueMap with MIT License 5 votes vote down vote up
public static String nodePathToString(ConfigurationNode node) {
	Object[] keys = node.getPath();
	String[] stringKeys = new String[keys.length];
	for (int i = 0; i < keys.length; i++) {
		stringKeys[i] = keys[i].toString();
	}
	return String.join(".", stringKeys);
}