LiteralArgument

class LiteralArgument<T>(name: String, action: ContextAction<T>?) : 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

See also

Parameters

name

Name of argument. This can be taken as an argument.

Check the following for the specifications of other arguments.

Constructors

LiteralArgument
Link copied to clipboard
fun <T> LiteralArgument(name: String, action: ContextAction<T>? = null)

Functions

parse
Link copied to clipboard
open override fun parse(context: CommandContext<CommandListenerWrapper>, key: String): String

Properties

action
Link copied to clipboard
open override val action: ContextAction<T>? = null

Argument context action

name
Link copied to clipboard
open override val name: String
suggestion
Link copied to clipboard
open override val suggestion: SuggestionAction<T>? = null

Lambda expression for tab completion of its arguments.

type
Link copied to clipboard
open override val type: ArgumentType<*>? = null

Mojang Brigadier argument type.