LiteralTextBuilder

class LiteralTextBuilder(internalText: BaseComponent)

Constructors

LiteralTextBuilder
Link copied to clipboard
fun LiteralTextBuilder(text: String)

Functions

build
Link copied to clipboard
fun build(): BaseComponent
emptyLine
Link copied to clipboard
fun emptyLine()
Adds an empty line.
hoverText
Link copied to clipboard
inline fun hoverText(text: String = "", builder: LiteralTextBuilder.() -> Unit = { })
Sets the text which should be displayed when hovering over the text in the chat.
legacyText
Link copied to clipboard
inline fun legacyText(text: String, builder: LiteralTextBuilder.() -> Unit = { })
Append the given legacy text to the parent.
newLine
Link copied to clipboard
fun newLine()
Adds a line break.
onClickCommand
Link copied to clipboard
fun onClickCommand(command: String, onlySuggest: Boolean = false)
Sets the command which should be executed by the Player if he clicks on the text.
onClickCopy
Link copied to clipboard
fun onClickCopy(copyText: String)
Sets the String which should be copied to the clipboard if the Player clicks on this text.
text
Link copied to clipboard
inline fun text(text: String = "", builder: LiteralTextBuilder.() -> Unit = { })
Append text to the parent.
inline fun text(text: BaseComponent, builder: LiteralTextBuilder.() -> Unit = { })
Append text to the parent.

Properties

bold
Link copied to clipboard
var bold: Boolean? = null
clickEvent
Link copied to clipboard
var clickEvent: ClickEvent? = null
color
Link copied to clipboard
var color: ChatColor? = null
The text color.
hoverEvent
Link copied to clipboard
var hoverEvent: HoverEvent? = null
internalText
Link copied to clipboard
val internalText: BaseComponent
italic
Link copied to clipboard
var italic: Boolean? = null
obfuscate
Link copied to clipboard
var obfuscate: Boolean? = null
siblingText
Link copied to clipboard
val siblingText: TextComponent
strikethrough
Link copied to clipboard
var strikethrough: Boolean? = null
underline
Link copied to clipboard
var underline: Boolean? = null