LiteralCommandDsl

A DSL builder for constructing literal command nodes.

This class wraps a LiteralArgumentBuilder and provides a Kotlin-idiomatic way to build command structures. It supports nested literals, arguments, execution handlers, and permission requirements.

Functions

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

Adds an argument child node to this command.

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 command.

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

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