sendText

fun CommandSource.sendText(text: Component)(source)

Sends the given Component to the player.

This function currently simply calls the CommandSource.sendSystemMessage function. It exists to provide a more consistent API with the more complex sendText builder function. Additionally, it will remain stable in case Minecraft changes the API in the future.


inline fun CommandSource.sendText(baseText: String? = null, builder: LiteralTextBuilder.() -> Unit = { })(source)

Opens a LiteralTextBuilder and sends the resulting MutableComponent to the player.

See also


fun MinecraftServer.sendText(text: Component)(source)

Deprecated

The function name sendText is inconsistent, use broadcastText instead.

Replace with

this.broadcastText(text)