Interface ArgValidator<S extends CommandSource>
- Type Parameters:
S- theCommandSourcetype providing execution context for the argument
- All Superinterfaces:
Comparable<ArgValidator<S>>,Prioritizable
- All Known Implementing Classes:
ConstrainedValueValidator,RangeValidator
public interface ArgValidator<S extends CommandSource>
extends Comparable<ArgValidator<S>>, Prioritizable
Validates a parsed command argument.
This is a functional interface intended to be used wherever argument\-level validation is required (e.g., to reject missing/invalid values before command execution).
-
Method Summary
Modifier and TypeMethodDescriptiondefault intcompareTo(@NotNull ArgValidator<S> o) static <S extends CommandSource>
ArgValidator<S>empty()default @NotNull Priorityvoidvalidate(CommandContext<S> context, ParsedArgument<S> parsedArgument)
-
Method Details
-
empty
-
getPriority
- Specified by:
getPriorityin interfacePrioritizable
-
validate
- Throws:
CommandException
-
compareTo
- Specified by:
compareToin interfaceComparable<S extends CommandSource>
-