component

fun String.component(style: Style = Style.empty()): @NonNull TextComponent

Converts a String to a Text Component. You can also specify the Style.

fun String.component(color: Color): @NonNull TextComponent

Converts a String to a Text Component. You can also specify the Color.

fun component(builder: ComponentBuilderAction): @NonNull TextComponent

Create a TextComponent using ComponentBuilder.