Package org.quiltmc.qkl.wrapper.minecraft.brigadier.util

Functions

Link copied to clipboard
fun CommandContext<ServerCommandSource>.broadcastSystemMessage(message: Text, messageType: RegistryKey<MessageType> = MessageType.SYSTEM)

Sends message to every player on the server, with messageType if one is given.

Link copied to clipboard
inline fun <S, B1 : ArgumentBuilder<S, *>, B2 : ArgumentBuilder<S, *>, D1 : ArgumentDescriptor<*>, D2 : ArgumentDescriptor<*>> ArgumentBuilder<S, *>.required(    first: ArgumentConstructor<S, B1, D1>,     second: ArgumentConstructor<S, B2, D2>,     action: B2.(ArgumentAccessor<S, D1>, ArgumentAccessor<S, D2>) -> Unit)
inline fun <S, B1 : ArgumentBuilder<S, *>, B2 : ArgumentBuilder<S, *>, B3 : ArgumentBuilder<S, *>, D1 : ArgumentDescriptor<*>, D2 : ArgumentDescriptor<*>, D3 : ArgumentDescriptor<*>> ArgumentBuilder<S, *>.required(    first: ArgumentConstructor<S, B1, D1>,     second: ArgumentConstructor<S, B2, D2>,     third: ArgumentConstructor<S, B3, D3>,     action: B3.(ArgumentAccessor<S, D1>, ArgumentAccessor<S, D2>, ArgumentAccessor<S, D3>) -> Unit)

Shorthand allowing registering multiple required arguments at once, with no branches between them.

Link copied to clipboard
fun CommandContext<ServerCommandSource>.sendFeedback(message: Text, broadcastToOps: Boolean = false)

Sends message as a system message to the player. Also sends to operators, if broadcastToOps is true.

Properties

Link copied to clipboard
val CommandContext<ServerCommandSource>.entity: Entity?

Entity executing the command or null if not executed by an entity.

Link copied to clipboard
val CommandContext<ServerCommandSource>.player: ServerPlayerEntity?

Player executing the command or null if not executed by a player.

Link copied to clipboard
val CommandContext<ServerCommandSource>.server: MinecraftServer

Server the command is being executed on.

Link copied to clipboard
val CommandContext<ServerCommandSource>.world: ServerWorld

World from which the command originates.