Text

open class Text(builder: ComponentBuilder<*, *>) : Stylable

A text part of a Message.

If a formatting option is not specified, the value of the containing message is applied.

Parameters

builder

The component builder.

Inheritors

Constructors

Link copied to clipboard
constructor(builder: ComponentBuilder<*, *>)

Creates a message component with the given text.

constructor(component: Component)
constructor(text: String)

Functions

Link copied to clipboard
open override fun bold(bold: Boolean)

Sets the font to bold.

Link copied to clipboard
open override fun color(color: TextColor)

Sets the color for the component.

Link copied to clipboard
open override fun italic(italic: Boolean)

Sets the font to italic.

Link copied to clipboard
open override fun obfuscated(obfuscated: Boolean)

Obfuscates text by switching each letter between multiple characters. Will result in non-readable text.

Link copied to clipboard
open override fun strikeThrough(strikeThrough: Boolean)

Strikes the text through.

Link copied to clipboard
open override fun underlined(underlined: Boolean)

Underlines the text.