TextList

class TextList : Component

Text, but only siblings

Properties

Link copied to clipboard
val EMPTY: FormattedText
Link copied to clipboard
val siblings: List<Component>
Link copied to clipboard
Link copied to clipboard
open val visualOrderText: FormattedCharSequence

Functions

Link copied to clipboard
fun FormattedText.asFormattedCharSequence(): FormattedCharSequence
Link copied to clipboard
open fun composite(parts: Array<FormattedText>): FormattedText
Link copied to clipboard
open fun contains(other: Component): Boolean
Link copied to clipboard
open fun copy(): MutableComponent
Link copied to clipboard
open fun empty(): MutableComponent
Link copied to clipboard
open fun getContents(): ComponentContents
Link copied to clipboard
abstract fun getSiblings(): List<Component>
Link copied to clipboard
open fun getString(): String
Link copied to clipboard
open fun getStyle(): Style
Link copied to clipboard
abstract fun getVisualOrderText(): FormattedCharSequence
Link copied to clipboard
open fun keybind(name: String): MutableComponent
Link copied to clipboard
open fun literal(text: String): MutableComponent
Link copied to clipboard
fun Component.mapComponent(contentMapper: UnaryOperator<ComponentContents> = UnaryOperator.identity(), styleMapper: UnaryOperator<Style> = UnaryOperator.identity()): Component

Returns a new component with contentMapper applied to the contents and styleMapper applied to the style of every part, or the receiver itself if nothing changed.

Link copied to clipboard
open fun nbt(nbtPath: CompilableString<NbtPathArgument.NbtPath>, interpreting: Boolean, plain: Boolean, separator: Optional<Component>, dataSource: DataSource): MutableComponent
Link copied to clipboard
open fun nullToEmpty(text: @Nullable String): Component
Link copied to clipboard
open fun object(info: ObjectInfo): MutableComponent
Link copied to clipboard
open fun of(@Nullable siblings: @Nullable List<Component>): TextList
open fun of(texts: Array<Component>): TextList
open fun of(text: String): FormattedText
Link copied to clipboard
open fun plainCopy(): MutableComponent
Link copied to clipboard
fun Component.sanitizeForeignInput(): FormattedCharSequence

Sanitizes texts which are sent to the client.

Link copied to clipboard
fun Component.sanitizeForSerialization(): Component
Link copied to clipboard
open fun score(pattern: CompilableString<EntitySelector>, objective: String): MutableComponent
Link copied to clipboard
open fun selector(pattern: CompilableString<EntitySelector>, separator: Optional<Component>): MutableComponent
Link copied to clipboard
open fun toFlatList(): List<Component>
Link copied to clipboard
open fun translatable(key: String): MutableComponent
Link copied to clipboard
open fun translatableEscape(key: String, args: Array<Any>): MutableComponent
Link copied to clipboard
open fun translatableWithFallback(key: String, fallback: @Nullable String): MutableComponent
Link copied to clipboard
open fun translationArg(date: Date): Component
Link copied to clipboard
open fun tryCollapseToString(): @Nullable String
Link copied to clipboard
open fun <T> visit(output: FormattedText.StyledContentConsumer<T>, parentStyle: Style): Optional<T>