Interface FormattedMessagePart
public interface FormattedMessagePart
Represents a formatted message that can be sent to players.
This interface abstracts the underlying protocol implementation, allowing plugins to create formatted messages without depending on protocol internals.
-
Method Summary
Modifier and TypeMethodDescriptionGets child message parts.getColor()Gets the hex color of this part (e.g., "#FF5555").getText()Gets the text content of this part.isBold()Whether this part is bold.isItalic()Whether this part is italic.Whether this part has strikethrough.Whether this part is underlined.
-
Method Details
-
getText
Gets the text content of this part.- Returns:
- the text, or null if this is a container for children
-
getColor
Gets the hex color of this part (e.g., "#FF5555").- Returns:
- the color, or null if not set
-
isBold
Whether this part is bold.- Returns:
- true if bold, false if not, null if unset
-
isItalic
Whether this part is italic.- Returns:
- true if italic, false if not, null if unset
-
isUnderlined
Whether this part is underlined.- Returns:
- true if underlined, false if not, null if unset
-
isStrikethrough
Whether this part has strikethrough.- Returns:
- true if strikethrough, false if not, null if unset
-
getChildren
Gets child message parts.- Returns:
- list of children, or empty list if none
-