Package-level declarations

Types

Link copied to clipboard
class ArgumentCommandBuilder<Source : SharedSuggestionProvider, PermissionSource, T>(name: String, typeProvider: (CommandBuildContext) -> ArgumentType<T>) : CommandBuilder<Source, RequiredArgumentBuilder<Source, T>, ArgumentCommandNode<Source, T>>
Link copied to clipboard
typealias ArgumentResolver<S, T> = CommandContext<S>.() -> T

An argument resolver extracts the argument value out of the current CommandContext.

Link copied to clipboard
typealias BrigadierBuilder<Builder> = Builder.(context: CommandBuildContext) -> Unit
Link copied to clipboard
typealias ClientCommandSourceStack = ClientSuggestionProvider
Link copied to clipboard
abstract class CommandBuilder<Source : SharedSuggestionProvider, PermissionSource, Builder : ArgumentBuilder<Source, Builder>, Node : CommandNode<Source>>
Link copied to clipboard
class LiteralCommandBuilder<Source : SharedSuggestionProvider, PermissionSource>(name: String) : CommandBuilder<Source, LiteralArgumentBuilder<Source>, LiteralCommandNode<Source>>
Link copied to clipboard

An enum containing known permission levels. Information taken from the Minecraft wiki

Link copied to clipboard
class RegistrableCommand<Source : SharedSuggestionProvider, PermissionSource>(val commandBuilder: LiteralCommandBuilder<Source>)

A wrapper around mutable command builders, which makes sure they don't get mutated anymore and can be registered.

Link copied to clipboard

The simple argument builder is a variant of an ArgumentCommandBuilder lambda function that supports ArgumentResolver (passed as it).

Properties

Link copied to clipboard
val ClientCommandSourceStack.connection: ClientPacketListener
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
@Environment(value = EnvType.CLIENT)
inline fun clientCommand(name: String, register: Boolean = true, builder: LiteralCommandBuilder<ClientCommandSourceStack>.() -> Unit = {}): RegistrableCommand<ClientCommandSourceStack>

Creates a new client command. Opens a LiteralCommandBuilder. This command will work on the client, even if the player is connected to a third party server.

Link copied to clipboard
inline fun command(name: String, register: Boolean = true, builder: LiteralCommandBuilder<CommandSourceStack>.() -> Unit = {}): RegistrableCommand<CommandSourceStack>

Creates a new command. Opens a LiteralCommandBuilder.

Link copied to clipboard
fun ClientCommandSourceStack.sendFailure(message: Component)
Link copied to clipboard
fun ClientCommandSourceStack.sendSuccess(message: Component)