-
- All Implemented Interfaces:
-
dev.kotx.flylib.command.Argument
public final class LongArgument<T extends Object> implements Argument<Long, T>
Long value argument. You can specify the maximum and minimum values. If you enter it in the wrong coordinate format, an error will be displayed on the client side and even if you try to execute it, it will not be accepted. Expected input:
2
-12
0
-
-
Field Summary
Fields Modifier and Type Field Description private final ArgumentType<?>
type
private final String
name
private final SuggestionAction<T>
suggestion
private final ContextAction<T>
action
-
Constructor Summary
Constructors Constructor Description LongArgument(String name, Long min, Long max, SuggestionAction<T> suggestion, ContextAction<T> action)
-
Method Summary
Modifier and Type Method Description ArgumentType<?>
getType()
Mojang Brigadier argument type. String
getName()
SuggestionAction<T>
getSuggestion()
ContextAction<T>
getAction()
Argument context action Long
parse(CommandContext<CommandListenerWrapper> context, String key)
-
-
Constructor Detail
-
LongArgument
LongArgument(String name, Long min, Long max, SuggestionAction<T> suggestion, ContextAction<T> action)
- Parameters:
name
- Name of argument.min
- The lowest possible value for this argument.max
- The highest possible value for this argument.suggestion
- Lambda expression for tab completion of its arguments.
-
-
Method Detail
-
getType
ArgumentType<?> getType()
Mojang Brigadier argument type.
-
getSuggestion
SuggestionAction<T> getSuggestion()
-
getAction
ContextAction<T> getAction()
Argument context action
-
-
-
-