Interface Tag.Argument

  • Enclosing interface:
    Tag

    @NonExtendable
    public static interface Tag.Argument
    An argument that can be passed to a tag, after the first :.
    Since:
    4.10.0
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default @NotNull java.util.OptionalDouble asDouble()
      Try and parse this argument as a double.
      default @NotNull java.util.OptionalInt asInt()
      Try and parse this argument as an int.
      default boolean isFalse()
      Checks if this argument represents false.
      default boolean isTrue()
      Checks if this argument represents true.
      default @NotNull java.lang.String lowerValue()
      Returns the value of this argument, lower-cased in the root locale.
      @NotNull java.lang.String value()
      Returns the value of this argument.
    • Method Detail

      • value

        @NotNull
        @NotNull java.lang.String value()
        Returns the value of this argument.
        Returns:
        the value
        Since:
        4.10.0
      • lowerValue

        @NotNull
        default @NotNull java.lang.String lowerValue()
        Returns the value of this argument, lower-cased in the root locale.

        This value should be used for comparisons against literals, to help ensure MiniMessage tags are case-insensitive.

        Returns:
        the lower-cased value of this argument
        Since:
        4.10.0
      • isTrue

        default boolean isTrue()
        Checks if this argument represents true.
        Returns:
        if this argument represents true
        Since:
        4.10.0
      • isFalse

        default boolean isFalse()
        Checks if this argument represents false.
        Returns:
        if this argument represents false
        Since:
        4.10.0
      • asInt

        @NotNull
        default @NotNull java.util.OptionalInt asInt()
        Try and parse this argument as an int.

        The optional will only be present if the value is a valid integer.

        Returns:
        an optional providing the value of this argument as an integer
        Since:
        4.10.0
      • asDouble

        @NotNull
        default @NotNull java.util.OptionalDouble asDouble()
        Try and parse this argument as a double.

        The optional will only be present if the value is a valid double.

        Returns:
        an optional providing the value of this argument as an integer
        Since:
        4.10.0