ClickableMessage
A chat message the user can interact with.
Clickable messages allow setting mouse interactions by clicking, shift + clicking and hovering. Formatting and actions are inherited to all text components but can be overwritten by individual text components. To start building a message use message and declarative style kotlin syntax.
Functions
Copies the given text to the users clipboard when they click on the message.
Sets the source for the content when hovering over the message. Can be many things, e.g., a text component, item, entity, etc.
Sets the hover message displayed when the user hovers the mouse over the text.
Sets the text displayed as hover-message when the user hovers the mouse over the text.
Adds a new text component from a legacy message formatted with § and color codes. Useful for things such as player display names.
Obfuscates text by switching each letter between multiple characters. Will result in non-readable text.
Runs a command when left-clicking on the text as the user who clicked the message.
Strikes the text through.
Inserts a command into the client's chat bar of the user who clicked the message.
Adds a new text component to the message.
Convenience method to build a simple colorized message. For more flexible messages, use the overloaded version.
Converts the message to a TextComponent to use with the Chat API.
Underlines the text.