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
ConstructorsConstructorDescriptionBooleanNode(@NotNull ConfigurationNode<?> parent, @NotNull String name) Creates a new configuration node with a boolean value. -
Method Summary
Modifier and TypeMethodDescription@NotNull BooleanGets the default value of the node.@NotNull StringGets the name of the "value" node, which will be used if this node contains children and a value.voidSets the value of the node in the configuration file.final @NotNull Booleanvalue()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:
valuein classConfigurationNode<Boolean>- Returns:
- The boolean value.
- Since:
- 1.0.0
-
defaultValue
Gets the default value of the node.Defaults to
false.- Specified by:
defaultValuein 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:
getValueNodeNamein 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:
setValuein classConfigurationNode<Boolean>- Parameters:
value- The value to set.- Since:
- 1.9.0
-