Package-level declarations

Types

Link copied to clipboard
object ClientCommandSource : SharedSuggestionProvider

Lightweight command source for LiquidBounce client commands, mirroring the role of Minecraft's CommandSourceStack on the server side.

Link copied to clipboard
class CmdArg<T>

Typed handle passed into an argument or optional continuation.

Link copied to clipboard

Scope used to append the continuation of one argument chain. Nested scopes share the same backing element list.

Link copied to clipboard
interface CmdI18n

Shared i18n for CmdLiteralScope and CmdChainScope; helpers take this as receiver.

Link copied to clipboard

Root scope of a command declaration; receives the top-level nodes declared in the block of literal(...).

Link copied to clipboard
annotation class CommandDsl

Marker annotation preventing nested DSL scopes from calling members of outer scopes (e.g. attaching arguments to a parent literal from inside a handler block).

Functions

Link copied to clipboard
inline fun <T> CommandContext<ClientCommandSource>.arg(name: String): T

Type-safe argument access, mirroring ctx.getArgument(name, clazz) as used by the typed getters in vanilla commands (e.g. ItemArgument.getItem(ctx, "item")).

Link copied to clipboard
fun <T> argument(name: String, type: ArgumentType<T>): RequiredArgumentBuilder<ClientCommandSource, T>
Link copied to clipboard
fun <S> CommandContext<S>.deepestExecutableContext(): CommandContext<S>?

The context whose CommandContext.command should run for this parse.

Link copied to clipboard
fun <T> CommandContext<ClientCommandSource>.get(argument: CmdArg<T>): T

Reads a typed DSL argument directly from a Brigadier context.

Link copied to clipboard
fun literal(name: String): LiteralArgumentBuilder<ClientCommandSource>

Thin aliases that fix the source type of the Brigadier builders to ClientCommandSource, mirroring the convenience factories of Minecraft's Commands class (Commands.literal / Commands.argument).

fun literal(name: String, block: CmdLiteralScope.() -> Unit): LiteralArgumentBuilder<ClientCommandSource>

Builds a literal directly as a Brigadier builder using the typed command DSL. Register the returned builder through com.mojang.brigadier.CommandDispatcher.register.

Link copied to clipboard
fun StringRange.offset(offset: Int): StringRange
Link copied to clipboard
fun <S> onlinePlayers(): SuggestionProvider<S>

Suggests the names of the players currently online (tab list), vanilla-filtered.

Link copied to clipboard
fun redirectingAlias(mainNode: LiteralCommandNode<ClientCommandSource>, alias: String): LiteralCommandNode<ClientCommandSource>

A sibling literal that redirects to mainNode, copying requires and a no-argument command so gating is not bypassed and a bare alias still executes.

Link copied to clipboard
fun CommandDispatcher<ClientCommandSource>.register(name: String, aliases: Iterable<String> = emptyList(), block: CmdLiteralScope.() -> Unit): LiteralCommandNode<ClientCommandSource>

Builds a literal directly as a Brigadier builder using the typed command DSL (shortcut) Register the returned builder through com.mojang.brigadier.CommandDispatcher.register.

Link copied to clipboard
fun <S> suggestions(strings: () -> Iterable<String>?): SuggestionProvider<S>
fun <S> suggestions(strings: Iterable<String>): SuggestionProvider<S>
fun <S> suggestions(vararg strings: String): SuggestionProvider<S>

Appends all elements from strings as suggestion, filtered by the vanilla SharedSuggestionProvider matching (case-insensitive prefix / substring).

fun <S> suggestions(executor: Executor, strings: Supplier<Iterable<String>?>): SuggestionProvider<S>

Appends all elements from strings as suggestion. The supplier function is invoked on executor; the resulting future completes on the Minecraft main thread, mirroring vanilla where every suggestion future.