Class DoubleNode

java.lang.Object
dev.satyrn.papermc.api.configuration.v1.ConfigurationNode<Double>
dev.satyrn.papermc.api.configuration.v1.DoubleNode

public class DoubleNode extends ConfigurationNode<Double>
Represents a configuration node with a double-precision floating point value.
Since:
1.0.0
Author:
Isabel Maskrey
  • Constructor Details

    • DoubleNode

      public DoubleNode(@NotNull @NotNull ConfigurationNode<?> parent, @NotNull @NotNull String name)
      Creates a new configuration node with a double-precision floating point value.
      Parameters:
      parent - The parent container.
      name - The node name.
      Since:
      1.0.0
    • DoubleNode

      public DoubleNode(@NotNull @NotNull ConfigurationNode<?> parent, @NotNull @NotNull String name, double minValue, double maxValue)
      Creates a new configuration node with a double-precision floating point value.
      Parameters:
      parent - The parent container.
      name - The node name.
      minValue - The minimum value of the node.
      maxValue - The maximum value of the node.
      Since:
      1.6.2
  • Method Details

    • value

      @NotNull public final @NotNull Double value()
      Returns the double-precision floating point value of the node.
      Specified by:
      value in class ConfigurationNode<Double>
      Returns:
      The double-precision floating point value.
      Since:
      1.0.0
    • defaultValue

      @NotNull public @NotNull Double defaultValue()
      Gets the default value of the node.

      Defaults to 0D.

      Specified by:
      defaultValue in class ConfigurationNode<Double>
      Returns:
      The default value.
      Since:
      1.3.0
    • setValue

      public void setValue(Double value)
      Sets the value of the node.
      Overrides:
      setValue in class ConfigurationNode<Double>
      Parameters:
      value - The value to set.
      Since:
      1.9.0