-
- All Implemented Interfaces:
-
dev.kotx.flylib.command.Argument
public final class LiteralArgument<T extends Object> implements Argument<String, T>
An argument that does not have any user input. Input other than "name" is not allowed. If anything other than "name" is entered, an error will be displayed on the client side and even if you try to execute it, it will not be accepted. Expected input (if "name" specified "test"):
test
-
-
Field Summary
Fields Modifier and Type Field Description private final ArgumentType<?>
type
private final SuggestionAction<T>
suggestion
private final String
name
private final ContextAction<T>
action
-
Constructor Summary
Constructors Constructor Description LiteralArgument(String name, ContextAction<T> action)
-
Method Summary
Modifier and Type Method Description ArgumentType<?>
getType()
Mojang Brigadier argument type. SuggestionAction<T>
getSuggestion()
Lambda expression for tab completion of its arguments. String
getName()
ContextAction<T>
getAction()
Argument context action String
parse(CommandContext<CommandListenerWrapper> context, String key)
-
-
Constructor Detail
-
LiteralArgument
LiteralArgument(String name, ContextAction<T> action)
- Parameters:
name
- Name of argument.
-
-
Method Detail
-
getType
ArgumentType<?> getType()
Mojang Brigadier argument type.
-
getSuggestion
SuggestionAction<T> getSuggestion()
Lambda expression for tab completion of its arguments.
-
getAction
ContextAction<T> getAction()
Argument context action
-
-
-
-