ArgumentCommandDsl

A DSL builder for constructing argument command nodes.

This class wraps a RequiredArgumentBuilder and provides additional functionality specific to argument nodes, such as suggestion providers for tab completion.

Parameters

T

The type of the argument value

Functions

Link copied to clipboard
fun <U : Any> argument(name: String, type: ArgumentType<U>, block: ArgumentCommandDsl<U>.() -> Unit = {})

Adds another argument child node to this argument node.

Link copied to clipboard
fun executes(executor: CommandExecutor)

Sets the execution handler for this command node.

Link copied to clipboard
fun literal(name: String, block: LiteralCommandDsl.() -> Unit = {})

Adds a nested literal child node to this argument node.

Link copied to clipboard
fun requires(predicate: (CommandSourceStack) -> Boolean)

Sets a requirement predicate that must be satisfied for the command to be executable.

Link copied to clipboard
fun suggests(provider: SuggestionProvider<CommandSourceStack>)

Sets a suggestion provider for tab completion of this argument.