-
- All Implemented Interfaces:
-
dev.kotx.flylib.command.Argument
public final class VectorArgument<T extends Object> implements Argument<Vector, T>
An argument that takes direction as an input value. You can also use "~" and "^". If it falls below the minimum value or exceeds the maximum value, an error will be displayed on the client side, and even if you try to execute it, it will not be accepted. Expected input :
123 456 789~ ~10 ~111 ~5 ^10
-
-
Field Summary
Fields Modifier and Type Field Description private final ArgumentVec3typeprivate final Stringnameprivate final SuggestionAction<T>suggestionprivate final ContextAction<T>action
-
Constructor Summary
Constructors Constructor Description VectorArgument(String name, SuggestionAction<T> suggestion, ContextAction<T> action)
-
Method Summary
Modifier and Type Method Description ArgumentVec3getType()Mojang Brigadier argument type. StringgetName()SuggestionAction<T>getSuggestion()ContextAction<T>getAction()Argument context action Vectorparse(CommandContext<CommandListenerWrapper> context, String key)-
-
Constructor Detail
-
VectorArgument
VectorArgument(String name, SuggestionAction<T> suggestion, ContextAction<T> action)
- Parameters:
name- Name of argument.suggestion- Lambda expression for tab completion of its arguments.
-
-
Method Detail
-
getType
ArgumentVec3 getType()
Mojang Brigadier argument type.
-
getSuggestion
SuggestionAction<T> getSuggestion()
-
getAction
ContextAction<T> getAction()
Argument context action
-
-
-
-