Class BooleanNode
java.lang.Object
dev.satyrn.papermc.api.configuration.v1.ConfigurationNode<Boolean>
dev.satyrn.papermc.api.configuration.v1.BooleanNode
- Direct Known Subclasses:
MySQLConfiguration
Represents a configuration node with a boolean value.
- Since:
- 1.0.0
- Author:
- Isabel Maskrey
-
Constructor Summary
ConstructorDescriptionBooleanNode
(@NotNull ConfigurationNode<?> parent, @NotNull String name) Creates a new configuration node with a boolean value. -
Method Summary
Modifier and TypeMethodDescription@NotNull Boolean
Gets the default value of the node.@NotNull String
Gets the name of the "value" node, which will be used if this node contains children and a value.void
Sets the value of the node in the configuration file.final @NotNull Boolean
value()
Returns the boolean value of the node.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, getValuePath, getValuePath, hasChildren, hasName, isSubNode, save, setComments, setComments, setConfigValue, setInlineComments, setInlineComments, toString, toString
-
Constructor Details
-
BooleanNode
Creates a new configuration node with a boolean value.- Parameters:
parent
- The parent container.name
- The name of the configuration node.- Since:
- 1.0.0
-
-
Method Details
-
value
Returns the boolean value of the node.- Specified by:
value
in classConfigurationNode<Boolean>
- Returns:
- The boolean value.
- Since:
- 1.0.0
-
defaultValue
Gets the default value of the node.Defaults to
false
.- Specified by:
defaultValue
in classConfigurationNode<Boolean>
- Returns:
- The default value.
- Since:
- 1.3.0
-
getValueNodeName
Gets the name of the "value" node, which will be used if this node contains children and a value.Defaults to "enabled" for boolean nodes.
- Overrides:
getValueNodeName
in classConfigurationNode<Boolean>
- Returns:
- The name of the value node.
- Since:
- 1.9.0
-
setValue
Sets the value of the node in the configuration file.- Overrides:
setValue
in classConfigurationNode<Boolean>
- Parameters:
value
- The value to set.- Since:
- 1.9.0
-