Class DifficultyDependentNode<T>
java.lang.Object
dev.satyrn.papermc.api.configuration.v1.ConfigurationNode<T>
dev.satyrn.papermc.api.configuration.v1.DifficultyDependentNode<T>
- Type Parameters:
T- The value type, shared between each sub-node.
@Deprecated(since="1.9.1")
public abstract class DifficultyDependentNode<T>
extends ConfigurationNode<T>
Deprecated.
Represents a node which has a value dependent on difficulty.
- Since:
- 1.9.0
- Author:
- Isabel Maskrey
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDifficultyDependentNode(@NotNull ConfigurationNode<?> parent, @NotNull String name) Deprecated.Initializes a new difficulty-dependent configuration node. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Gets the default value of the node.@NotNull @Unmodifiable List<ConfigurationNode<?>>Deprecated.Gets an unmodifiable list of children for this node.protected @Nullable ConfigurationNode<T>Deprecated.Gets the node instance for the easy difficulty value.protected @Nullable ConfigurationNode<T>Deprecated.Gets the node instance for the hard difficulty value.protected @Nullable ConfigurationNode<T>Deprecated.Gets the node instance for the normal difficulty value.protected @Nullable ConfigurationNode<T>Deprecated.Gets the node instance for the peaceful difficulty value.final @NotNull StringDeprecated.Gets the name of the value node, which will be used if this node contains children and a value.voidsave()Deprecated.Writes the value of the node and its children to the config file.final voidDeprecated.Sets the value of the node for a specific difficulty.value()Deprecated.Gets the value of the node.value(@NotNull org.bukkit.Difficulty difficulty) Deprecated.Gets a value specific to the given difficulty value.Methods inherited from class dev.satyrn.papermc.api.configuration.v1.ConfigurationNode
addChild, equals, getBasePath, getBasePath, getComments, getComments, getConfig, getInlineComments, getInlineComments, getLogger, getName, getPath, getPath, getPlugin, getPriority, getSLF4JLogger, getValuePath, getValuePath, hasChildren, hasName, isSubNode, setComments, setComments, setConfigValue, setInlineComments, setInlineComments, setValue, toString, toString
-
Constructor Details
-
DifficultyDependentNode
protected DifficultyDependentNode(@NotNull @NotNull ConfigurationNode<?> parent, @NotNull @NotNull String name) Deprecated.Initializes a new difficulty-dependent configuration node.- Parameters:
parent- The parent node.name- The node name.- Since:
- 1.9.0
-
-
Method Details
-
getPeacefulNode
Deprecated.Gets the node instance for the peaceful difficulty value.- Returns:
- The peaceful node.
- Since:
- 1.9.0
-
getEasyNode
Deprecated.Gets the node instance for the easy difficulty value.- Returns:
- The easy node.
- Since:
- 1.9.0
-
getNormalNode
Deprecated.Gets the node instance for the normal difficulty value.- Returns:
- The normal node.
- Since:
- 1.9.0
-
getHardNode
Deprecated.Gets the node instance for the hard difficulty value.- Returns:
- The hard node.
- Since:
- 1.9.0
-
getValueNodeName
Deprecated.Gets the name of the value node, which will be used if this node contains children and a value.Defaults to "value" for most node types.
- Overrides:
getValueNodeNamein classConfigurationNode<T>- Returns:
- The name of the value node.
- Since:
- 1.9.0
-
value
Deprecated.Gets the value of the node.- Specified by:
valuein classConfigurationNode<T>- Returns:
- The value.
- Since:
- 1.9.0
-
defaultValue
Deprecated.Gets the default value of the node.- Specified by:
defaultValuein classConfigurationNode<T>- Returns:
- The value.
- Since:
- 1.9.0
-
value
Deprecated.Gets a value specific to the given difficulty value.- Parameters:
difficulty- The difficulty of the current world.- Returns:
- The value of the node for that difficulty.
- Since:
- 1.9.0
-
setValue
Deprecated.Sets the value of the node for a specific difficulty.- Parameters:
difficulty- The difficulty level.value- The value of the node at the difficulty level.- Since:
- 1.9.0
-
save
public void save()Deprecated.Writes the value of the node and its children to the config file.- Overrides:
savein classConfigurationNode<T>- Since:
- 1.9.1
-
getChildren
Deprecated.Gets an unmodifiable list of children for this node.- Overrides:
getChildrenin classConfigurationNode<T>- Returns:
- An unmodifiable list of the item's children.
- Since:
- 1.9.1
-
DifficultyDependentNodeinstead. Default value is removed.