Clickable

interface Clickable

A part of a message which supports mouse interaction.

Inheritors

Functions

Link copied to clipboard
abstract fun copyToClipboard(text: String)

Copies the given text to the users clipboard when they click on the message.

Link copied to clipboard
abstract fun hoverEvent(eventSource: HoverEventSource<*>)

Sets the source for the content when hovering over the message. Can be many things, e.g., a text component, item, entity, etc.

Link copied to clipboard
abstract fun hoverMessage(init: Message.() -> Unit = {})

Sets the hover message displayed when the user hovers the mouse over the text.

abstract fun hoverMessage(message: String, init: Text.() -> Unit = {})

Sets the text displayed as hover-message when the user hovers the mouse over the text.

Link copied to clipboard
abstract fun insert(text: String)

Sets the text appended to the client's text input when the user shift + left-clicks a message.

Link copied to clipboard
abstract fun openUrl(url: String)

Opens the "open URL" dialog when the user clicks on the message.

Link copied to clipboard
abstract fun runCommand(command: String)

Runs a command when left-clicking on the text as the user who clicked the message.

Link copied to clipboard
abstract fun suggestCommand(command: String)

Inserts a command into the client's chat bar of the user who clicked the message.