Class EnumListNode<E extends Enum<E>>
java.lang.Object
dev.satyrn.papermc.api.configuration.v1.ConfigurationNode<List<E>>
dev.satyrn.papermc.api.configuration.v1.EnumListNode<E>
- Type Parameters:
E
- The enum type.
- Direct Known Subclasses:
EnumListNode
Represents a configuration node with a list of enum values.
- Since:
- 1.0.0
- Author:
- Isabel Maskrey
-
Constructor Summary
ConstructorDescriptionEnumListNode
(@NotNull ConfigurationNode<?> parent, @NotNull String name) Creates a new configuration node with a list of enum values. -
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, setValue, toString, toString
-
Constructor Details
-
EnumListNode
Creates a new configuration node with a list of enum values.- Parameters:
parent
- The parent configuration.name
- The node's name.- Since:
- 1.0.0
-
-
Method Details
-
value
Gets the value of the node. -
parse
Parses the enum value.- Parameters:
value
- The string value from the config file- Returns:
- The parsed enum value.
- Throws:
IllegalArgumentException
- Thrown when an invalid value is parsed.- Since:
- 1.0.0
-
defaultValue
Gets the default value of the node.Defaults to an empty, unmodifiable list.
- Specified by:
defaultValue
in classConfigurationNode<List<E extends Enum<E>>>
- Returns:
- The value.
- Since:
- 1.3.0
-