Command

class Command(val name: String, val aliases: List<String>, val parameters: List<Parameter<*>>, val subcommands: List<Command>, val executable: Boolean, val handler: Command.Handler?, val requiresIngame: Boolean) : MinecraftShortcuts, DebuggedOwner

Constructors

Link copied to clipboard
constructor(name: String, aliases: List<String>, parameters: List<Parameter<*>>, subcommands: List<Command>, executable: Boolean, handler: Command.Handler?, requiresIngame: Boolean)

Types

Link copied to clipboard
fun interface Factory

Provides a Command to the CommandManager.

Link copied to clipboard
fun interface Handler

Properties

Link copied to clipboard
Link copied to clipboard
val description: MutableComponent
Link copied to clipboard
Link copied to clipboard
open val gpuDevice: GpuDevice
Link copied to clipboard
Link copied to clipboard
var index: Int
Link copied to clipboard
open val interaction: MultiPlayerGameMode
Link copied to clipboard
open val mc: Minecraft
Link copied to clipboard
Link copied to clipboard
open val network: ClientPacketListener
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val player: LocalPlayer
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val world: ClientLevel

Functions

Link copied to clipboard
fun autoComplete(builder: SuggestionsBuilder, tokenizationResult: Pair<List<String>, List<Int>>, commandIdx: Int, isNewParameter: Boolean)
Link copied to clipboard
inline fun DebuggedOwner.debugGeometry(name: String, lazyGeometry: () -> ModuleDebug.DebuggedGeometry?)
Link copied to clipboard
inline fun DebuggedOwner.debugParameter(name: String, lazyValue: () -> Any?)
Link copied to clipboard
fun nameAsText(): Component
Link copied to clipboard
fun printStyledComponent(key: String, textComponent: Component? = null, copyContent: String? = null, formatting: (MutableComponent) -> MutableComponent = ::regular, hover: HoverEvent? = HoverEvent.ShowText(translation("liquidbounce.tooltip.clickToCopy")))

Sends a styled command result with copyable content and custom text component

Link copied to clipboard
fun printStyledText(key: String, data: String? = null, formatting: (MutableComponent) -> MutableComponent = ::regular, hover: HoverEvent? = HoverEvent.ShowText(translation("liquidbounce.tooltip.clickToCopy")), click: ClickEvent? = data?.let(ClickEvent::CopyToClipboard))

Sends a styled command result with copyable content

Link copied to clipboard
fun result(key: String, vararg args: Any): MutableComponent
Link copied to clipboard
fun resultWithTree(key: String, vararg args: Any): MutableComponent
Link copied to clipboard
fun usage(): List<Component>

Returns the formatted usage information of this command