chat
Message
¶
A class to handle Minecraft chat messages with full formatting and event support.
create
classmethod
¶
to_formatted_string
¶
Python
to_formatted_string() -> str
Convert all components to formatted string with Minecraft codes.
| RETURNS | DESCRIPTION |
|---|---|
str
|
The formatted message string with Minecraft formatting codes (e.g., §a for green) and event markers. |
to_plain_text
¶
Python
to_plain_text() -> str
Convert all components to plain text without formatting.
| RETURNS | DESCRIPTION |
|---|---|
str
|
The message content without any formatting or style information. |
get_click_commands
¶
get_click_events
¶
Python
get_click_events() -> List[MessageEvent]
Get all click events from the message.
| RETURNS | DESCRIPTION |
|---|---|
List[MessageEvent]
|
A list of all MessageEvent objects representing click actions in the message. |
get_hover_events
¶
Python
get_hover_events() -> List[MessageEvent]
Get all hover events from the message.
| RETURNS | DESCRIPTION |
|---|---|
List[MessageEvent]
|
A list of all MessageEvent objects representing hover actions in the message. |