Class IntegerNode
java.lang.Object
dev.satyrn.papermc.api.configuration.v1.ConfigurationNode<Integer>
dev.satyrn.papermc.api.configuration.v1.IntegerNode
Represents a configuration node with an integer value.
- Since:
- 1.0.0
- Author:
- Isabel Maskrey
-
Constructor Summary
ConstructorDescriptionIntegerNode
(@NotNull ConfigurationNode<?> parent, @NotNull String name) Creates a new configuration node with an integer value.IntegerNode
(@NotNull ConfigurationNode<?> parent, @NotNull String name, int minValue, int maxValue) Creates a new configuration node with an integer value. -
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, save, setComments, setComments, setConfigValue, setInlineComments, setInlineComments, toString, toString
-
Constructor Details
-
IntegerNode
Creates a new configuration node with an integer value.- Parameters:
parent
- The parent container.name
- The node's name.- Since:
- 1.0.0
-
IntegerNode
public IntegerNode(@NotNull @NotNull ConfigurationNode<?> parent, @NotNull @NotNull String name, int minValue, int maxValue) Creates a new configuration node with an integer value. The value is bounded by min and max.- Parameters:
parent
- The parent configuration container.name
- The node's name.minValue
- The minimum value allowed by the node.maxValue
- The maximum value allowed by the node.- Since:
- 1.6.2
-
-
Method Details
-
value
Returns the integer value of the node.- Specified by:
value
in classConfigurationNode<Integer>
- Returns:
- The integer value.
- Since:
- 1.0.0
-
defaultValue
Gets the default value of the node.Defaults to
0
.- Specified by:
defaultValue
in classConfigurationNode<Integer>
- Returns:
- The default value.
- Since:
- 1.3.0
-
setValue
Sets the value of the node.- Overrides:
setValue
in classConfigurationNode<Integer>
- Parameters:
value
- The value to set.- Since:
- 1.9.0
-