# LiteralTextBuilder

class LiteralTextBuilder(internalText: BaseComponent)
Content copied to clipboard

## Constructors

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

## Functions

build
Link copied to clipboard
fun build(): BaseComponent
Content copied to clipboard
emptyLine
Link copied to clipboard
fun emptyLine()
Content copied to clipboard
Adds an empty line.
hoverText
Link copied to clipboard
inline fun hoverText(text: String = "", builder: LiteralTextBuilder.() -> Unit = { })
Content copied to clipboard
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 = { })
Content copied to clipboard
Append the given legacy text to the parent.
newLine
Link copied to clipboard
fun newLine()
Content copied to clipboard
Adds a line break.
onClickCommand
Link copied to clipboard
fun onClickCommand(command: String, onlySuggest: Boolean = false)
Content copied to clipboard
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)
Content copied to clipboard
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 = { })
Content copied to clipboard
Append text to the parent.
inline fun text(text: BaseComponent, builder: LiteralTextBuilder.() -> Unit = { })
Content copied to clipboard
Append text to the parent.

## Properties

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