CommandNode

An immutable node of a command's argument tree: the completions offered at this position, how to navigate to the next node for a typed argument, and an optional executor.

Build one with build and the NodeBuilder DSL:

override fun commandTree() = CommandNode.build {
choice("give") {
dynamic({ EffectiveItem.namespacedKeyToItem.keys.toList() }) {
executes { args -> /* give args[1] */}
}
}
}

Types

Link copied to clipboard
object Companion