Package-level declarations

Types

Link copied to clipboard
A lazy text component with async loading.
Link copied to clipboard
data class ColoredChar(val char: Char, val color: ChatFormatting) : Record
Link copied to clipboard
interface DelegatedComponent : Component, Supplier<Component>
A component that is delegated to another component.
Link copied to clipboard
class PlainText : Record, Component, FormattedCharSequence, CharSequence
A plain and immutable Component, FormattedCharSequence and CharSequence.
Link copied to clipboard
class RunnableClickEvent : Record, ClickEvent, Runnable
Allows net.minecraft.network.chat.MutableComponent to execute anything on click.
Link copied to clipboard

A mode for matching strings.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class TextList : Component
Text, but only siblings

Functions

Link copied to clipboard
inline fun String.asPlainText(): Component

Returns an immutable Component from the receiver.

inline fun String.asPlainText(formatting: ChatFormatting): Component

Returns an immutable Component from the receiver with formatting.

inline fun String.asPlainText(style: Style): Component

Returns an immutable Component from the receiver with style.

Link copied to clipboard
inline fun Array<out Component>.asText(): Component
inline fun List<Component>.asText(): Component

inline fun String.asText(): MutableComponent

Returns a MutableComponent from the receiver. If you just need a Component, use asPlainText instead.

Link copied to clipboard
inline fun String.asTextContent(): ComponentContents
Link copied to clipboard
inline fun buildText(builderAction: TextBuilder.() -> Unit): Component
Link copied to clipboard
Link copied to clipboard
inline fun Char.colored(color: ChatFormatting): ColoredChar
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Converts milliseconds to seconds, minutes, hours and days when present.

Link copied to clipboard
Link copied to clipboard
fun Collection<Component>.joinToText(separator: Component): Component

Joins a list of Component into a single Component with the given separator.

fun <T> Collection<T>.joinToText(separator: Component, prefix: Component? = null, postfix: Component? = null, transform: Function<T, Component>): Component
Link copied to clipboard
inline operator fun Style.plus(color: Color4b): Style
inline operator fun Style.plus(formatting: ChatFormatting): Style
inline operator fun Style.plus(clickEvent: ClickEvent): Style
inline operator fun Style.plus(hoverEvent: HoverEvent): Style
inline operator fun Style.plus(color: TextColor): Style
Link copied to clipboard
Link copied to clipboard

Returns the root domain of the domain.

Link copied to clipboard
Link copied to clipboard
inline fun style(block: StyleBuilder.() -> Unit): Style
Link copied to clipboard
fun textLoadingBar(percent: Int, progress: ColoredChar = '█'.colored(ChatFormatting.WHITE), remaining: ColoredChar = '░'.colored(ChatFormatting.DARK_GRAY), length: Int = 10): Component

Generates a progress bar based on the percentage (range 0 to 100).

Link copied to clipboard
inline fun textOf(vararg parts: Component): Component
Link copied to clipboard
Link copied to clipboard
fun FormattedCharSequence.toText(): Component
Link copied to clipboard
fun TranslatableContents.toTranslatedString(): String
Link copied to clipboard

Translate alt color codes to minecraft color codes

Link copied to clipboard
fun Component.translated(): Component
fun ComponentContents.translated(): ComponentContents
Link copied to clipboard
inline fun Style.with(block: StyleBuilder.() -> Unit): Style