Class BungeeConfig.BungeeConfigNode
java.lang.Object
io.github.projectunified.craftconfig.bungeecord.BungeeConfig.BungeeConfigNode
- All Implemented Interfaces:
ConfigNode
- Enclosing class:
BungeeConfig
BungeeCord implementation of
ConfigNode.-
Method Summary
Modifier and TypeMethodDescriptionget()Get the value at this nodeGet the child nodes of this node.getComment(CommentType type) Get the comment for this nodeGet the root Config that owns this nodeGet the normalized value at this node (plain Java types).Get the parent node (the origin).String[]getPath()Get the path relative to the origin node.booleanhasChild()Check if this node has childrenNavigate to a child node.voidremove()Remove this node from the configurationvoidSet the value at this nodevoidsetComment(CommentType type, List<String> value) Set the comment for this nodeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.projectunified.craftconfig.common.ConfigNode
exists, get, get, get, getComment, normalizeObject, setComment, setIfAbsent
-
Method Details
-
getPath
Description copied from interface:ConfigNodeGet the path relative to the origin node. When obtained from Config.node(), returns the full path from root. When obtained from ConfigNode.node() or getChildren(), returns the relative path.- Specified by:
getPathin interfaceConfigNode- Returns:
- the path segments
-
getParent
Description copied from interface:ConfigNodeGet the parent node (the origin). When obtained from Config.node(), returns the Config (root node). When obtained from ConfigNode.node() or getChildren(), returns that ConfigNode.- Specified by:
getParentin interfaceConfigNode- Returns:
- the parent node
-
getConfig
Description copied from interface:ConfigNodeGet the root Config that owns this node- Specified by:
getConfigin interfaceConfigNode- Returns:
- the owning Config
-
get
Description copied from interface:ConfigNodeGet the value at this node- Specified by:
getin interfaceConfigNode- Returns:
- the value, or null if not present
-
set
Description copied from interface:ConfigNodeSet the value at this node- Specified by:
setin interfaceConfigNode- Parameters:
value- the value to set
-
node
Description copied from interface:ConfigNodeNavigate to a child node. Should only be called ifConfigNode.hasChild()returns true.- Specified by:
nodein interfaceConfigNode- Parameters:
path- the path segments (relative to this node)- Returns:
- the child node
-
remove
public void remove()Description copied from interface:ConfigNodeRemove this node from the configuration- Specified by:
removein interfaceConfigNode
-
hasChild
public boolean hasChild()Description copied from interface:ConfigNodeCheck if this node has children- Specified by:
hasChildin interfaceConfigNode- Returns:
- true if this node has child nodes
-
getChildren
Description copied from interface:ConfigNodeGet the child nodes of this node. Should only be called ifConfigNode.hasChild()returns true.- Specified by:
getChildrenin interfaceConfigNode- Returns:
- map of child key to child node
-
getNormalized
Description copied from interface:ConfigNodeGet the normalized value at this node (plain Java types). Recursively normalizes Maps and Collections.- Specified by:
getNormalizedin interfaceConfigNode- Returns:
- the normalized value, or null if not present
-
getComment
Description copied from interface:ConfigNodeGet the comment for this node- Specified by:
getCommentin interfaceConfigNode- Parameters:
type- the comment type- Returns:
- the comment lines, or empty list if none
-
setComment
Description copied from interface:ConfigNodeSet the comment for this node- Specified by:
setCommentin interfaceConfigNode- Parameters:
type- the comment typevalue- the comment lines, or null to remove
-