Package-level declarations

Types

Link copied to clipboard
data class StylizedChar(val char: Char, val style: Style)

Functions

Link copied to clipboard
fun <C : BuildableComponent<C, B>, B : ComponentBuilder<C, B>> ComponentBuilder<C, B>.append(fontChar: FontChar): B

Appends the fontChar's component to this component.

Link copied to clipboard
fun <C : BuildableComponent<C, B>, B : ComponentBuilder<C, B>> ComponentBuilder<C, B>.appendCentered(component: Component, lang: String = "en_us"): B

Moves the cursor by half the width of the component to the left, then appends the component.

Link copied to clipboard
fun Component.chars(lang: String = "en_us"): Sequence<StylizedChar>
Link copied to clipboard
fun Component.charsIterator(lang: String = "en_us"): Iterator<StylizedChar>
Link copied to clipboard
fun <C : BuildableComponent<C, B>, B : ComponentBuilder<C, B>> ComponentBuilder<C, B>.color(color: Color): B

Sets the color of this component to color.

Link copied to clipboard
fun Component.font(font: String): Component

fun <C : BuildableComponent<C, B>, B : ComponentBuilder<C, B>> ComponentBuilder<C, B>.font(font: String): B

Sets the font of this component to font.

Link copied to clipboard
fun Component.fontName(): String?
Link copied to clipboard
fun <C : BuildableComponent<C, B>, B : ComponentBuilder<C, B>> ComponentBuilder<C, B>.move(distance: Number): B

Moves the cursor by distance gui-scale-affected pixels.

Link copied to clipboard
fun <C : BuildableComponent<C, B>, B : ComponentBuilder<C, B>> ComponentBuilder<C, B>.moveTo(afterStart: Number, lang: String = "en_us"): B

Moves the cursor to afterStart pixels after the beginning of the text, using lang to localize all potential translatable components.

Link copied to clipboard
fun <C : BuildableComponent<C, B>, B : ComponentBuilder<C, B>> ComponentBuilder<C, B>.moveToCenter(lang: String = "en_us"): B

Moves the cursor to the center of the text, using lang to localize all potential translatable components.

Link copied to clipboard
fun <C : BuildableComponent<C, B>, B : ComponentBuilder<C, B>> ComponentBuilder<C, B>.moveToStart(lang: String = "en_us"): B

Moves the cursor to the beginning of the text, using lang to localize all potential translatable components.

Link copied to clipboard
fun Array<out BaseComponent>.toAdventureComponent(): Component
fun String.toAdventureComponent(): Component
fun Component.toAdventureComponent(): Component
Link copied to clipboard
fun String.toAdventureComponentOr(createComponent: () -> Component): Component
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Component.toJson(): String
fun Component.toJson(): String
Link copied to clipboard
fun Component.toNBT(): StringTag
Link copied to clipboard
fun Component.toNMSComponent(): Component
Link copied to clipboard
fun Style.toNmsStyle(): Style
Link copied to clipboard
fun Component.toPlainText(locale: String = "en_us"): String
fun Component.toPlainText(player: Player): String
Link copied to clipboard
fun Component.withoutPreFormatting(): Component
fun Component.withoutPreFormatting(): Component