Package-level declarations
Core DSL primitives and node builders used to construct command trees.
This package contains:
Entry points like io.github.kraftlin.command.brigadierCommand for creating command trees.
Node builders like io.github.kraftlin.command.literal and io.github.kraftlin.command.argument.
io.github.kraftlin.command.KContext for idiomatic argument retrieval.
Execution builders like io.github.kraftlin.command.executes and io.github.kraftlin.command.executesResult.
Requirement builders like io.github.kraftlin.command.requires.
All functionality here is platform-agnostic and does not depend on Paper or Minecraft classes.
Types
Scope for building a required argument node. Extends LiteralNode with suggests.
Marks Kraftlin command DSL scopes to prevent accidental nesting.
Receiver for command execution blocks. Prevents nesting DSL scopes inside executes.
Abstraction over platform-specific command source handling.
Functions
Adds a boolean argument.
Builds a Brigadier command tree rooted at a literal node named name.
Registers the execution handler for this node. Returns Command.SINGLE_SUCCESS automatically.
Registers an execution handler that returns a custom Brigadier result code.
Returns the string value. Alias for string. @see LiteralNode.greedyString
Adds a greedy string argument that consumes all remaining input. @see KContext.greedyString
Requires the source to have the given permission, checked via platform.
Requires the platform sender to match a predicate (e.g. to check sender type).
Adds a quoted or single-word string argument.
Registers a dynamic suggestion provider for this argument.
Registers a fixed set of suggestion values for this argument.
Returns the string value. Alias for string. @see LiteralNode.word
Adds a single-word string argument. @see KContext.word