java.lang.Object
net.minestom.server.command.builder.arguments.Argument<T>
net.minestom.server.command.builder.arguments.minecraft.ArgumentRange<T>
Type Parameters:
T - the type of the range
Direct Known Subclasses:
ArgumentFloatRange, ArgumentIntRange

public abstract class ArgumentRange<T>
extends Argument<T>
Abstract class used by ArgumentIntRange and ArgumentFloatRange.
  • Field Details

  • Constructor Details

  • Method Details

    • getConditionResult

      public int getConditionResult​(@NotNull T value)
      Description copied from class: Argument
      Called after Argument.parse(String) meaning that value should already represent a valid representation of the input.

      The condition result has for goal to check the optional conditions that are user configurable (eg min/max values for a number, a specific material for an item, etc...).

      Specified by:
      getConditionResult in class Argument<T>
      Parameters:
      value - The parsed argument
      Returns:
      the error code or Argument.SUCCESS