TextComponent

@Serializable(with = TextComponentSerializer::class)
data class TextComponent(val text: String, val color: String = "", val styles: Set<TextStyle> = emptySet(), val extra: List<TextComponent> = emptyList())

MOTD text component.

Constructors

Link copied to clipboard
constructor(text: String, color: String = "", styles: Set<TextStyle> = emptySet(), extra: List<TextComponent> = emptyList())

Properties

Link copied to clipboard

Hex color code.

Link copied to clipboard

Child components.

Link copied to clipboard

Text styles.

Link copied to clipboard

Raw text.

Functions

Link copied to clipboard

Converts this TextComponent into an HTML string.

Link copied to clipboard

Converts this TextComponent into a plain text.