Class OptionalConfigurationNode<T>
java.lang.Object
dev.satyrn.papermc.api.configuration.v1.ConfigurationNode<Optional<T>>
dev.satyrn.papermc.api.configuration.v1.OptionalConfigurationNode<T>
- Type Parameters:
T
- The type of the configuration node.
A configuration node
- Since:
- 1.9.1
- Author:
- Isabel Maskrey
-
Constructor Summary
ModifierConstructorDescriptionprotected
OptionalConfigurationNode
(@NotNull ConfigurationNode<?> parent, @Nullable String name) Initializes a new Configuration node. -
Method Summary
Methods inherited from class dev.satyrn.papermc.api.configuration.v1.ConfigurationNode
addChild, equals, getBasePath, getBasePath, getChildren, getComments, getComments, getConfig, getInlineComments, getInlineComments, getLogger, getName, getPath, getPath, getPlugin, getPriority, getSLF4JLogger, getValueNodeName, getValuePath, getValuePath, hasChildren, hasName, isSubNode, setComments, setComments, setConfigValue, setInlineComments, setInlineComments, setValue, toString, toString
-
Constructor Details
-
OptionalConfigurationNode
protected OptionalConfigurationNode(@NotNull @NotNull ConfigurationNode<?> parent, @Nullable @Nullable String name) Initializes a new Configuration node.- Parameters:
parent
- The parent node.name
- The node name.- Since:
- 1.9.1
-
-
Method Details
-
value
Gets the value of the node.- Specified by:
value
in classConfigurationNode<Optional<T>>
- Returns:
- The value.
- Since:
- 1.9.1
-
defaultValue
Gets the default value of the node.- Specified by:
defaultValue
in classConfigurationNode<Optional<T>>
- Returns:
- The default value.
- Since:
- 1.9.1
-
getActualValue
Gets the underlying value of the node.- Returns:
- The actual value of the node.
- Since:
- 1.9.1
-
save
public void save()Writes the value of the node to the config file.- Overrides:
save
in classConfigurationNode<Optional<T>>
- Since:
- 1.9.1
-