Class NumberArgument<S extends CommandSource,N extends Number>
java.lang.Object
studio.mevera.imperat.util.TypeCapturer
studio.mevera.imperat.command.arguments.type.ArgumentType<S,N>
studio.mevera.imperat.command.arguments.type.NumberArgument<S,N>
- All Implemented Interfaces:
Prioritizable
public abstract class NumberArgument<S extends CommandSource,N extends Number>
extends ArgumentType<S,N>
-
Field Summary
Fields inherited from class studio.mevera.imperat.command.arguments.type.ArgumentType
suggestions, type -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class studio.mevera.imperat.command.arguments.type.ArgumentType
addStaticSuggestions, equalsExactly, getDefaultValueProvider, getNumberOfParametersToConsume, getPriority, getSuggestionProvider, isGreedy, isRelatedToType, parse, type, wrappedTypeMethods inherited from class studio.mevera.imperat.util.TypeCapturer
extractType, extractType
-
Constructor Details
-
NumberArgument
protected NumberArgument()
-
-
Method Details
-
parse
public abstract N parse(@NotNull @NotNull CommandContext<S> context, @NotNull @NotNull Argument<S> argument, @NotNull @NotNull String input) throws ResponseException Description copied from class:ArgumentTypeParses the argument value from the given input string, using the provided execution context. This method is responsible for converting the raw input into the appropriate type, handling any necessary validation or error handling during the parsing process.- Specified by:
parsein classArgumentType<S extends CommandSource,N extends Number> - Parameters:
context- the execution context.argument- the argument with this type.input- the raw input string to parse.- Returns:
- the resolved value of type T.
- Throws:
ResponseException
-
display
-
cast
- Throws:
ClassCastException
-