sendMessage

abstract fun sendMessage(message: Component)

Sends an Adventure Component message to the player.

Use this method for rich text formatting with colors, hover effects, and click events.

Example:

player.edit {
sendMessage(Component.text("Hello!", NamedTextColor.GOLD))
}

Parameters

message

The Adventure Component to send.


abstract fun sendMessage(message: String)

Sends a plain text message to the player.

The message is automatically converted to an Adventure Component.

Example:

player.edit {
sendMessage("Welcome to the server!")
}

Parameters

message

The plain text message to send.