PlainText

class PlainText : Record, Component, FormattedCharSequence, CharSequence

A plain and immutable Component, FormattedCharSequence and CharSequence.

Constructors

Link copied to clipboard
constructor(content: PlainTextContents)

Properties

Link copied to clipboard
val EMPTY: FormattedText
val EMPTY: FormattedCharSequence
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open fun accept(visitor: FormattedCharSink): Boolean
Link copied to clipboard
open fun backward(text: String, style: Style): FormattedCharSequence
Link copied to clipboard
open fun charAt(index: Int): Char
Link copied to clipboard
open fun chars(): IntStream
Link copied to clipboard
open fun codepoint(codePoint: Int, style: Style): FormattedCharSequence
Link copied to clipboard
open fun codePoints(): IntStream
Link copied to clipboard
open fun compare(cs1: CharSequence, cs2: CharSequence): Int
Link copied to clipboard
open fun composite(elements: Array<FormattedText>): FormattedText
open fun composite(): FormattedCharSequence
Link copied to clipboard
open fun contains(@Nullable text: @Nullable Component): Boolean
Link copied to clipboard
open fun copy(): MutableComponent
Link copied to clipboard
open fun decorateOutput(sink: FormattedCharSink, codePointMapper: Int2IntFunction): FormattedCharSink
Link copied to clipboard
open fun empty(): PlainText
open fun empty(): MutableComponent
Link copied to clipboard
abstract fun equals(p: Any): Boolean
Link copied to clipboard
open fun forward(text: String, style: Style): FormattedCharSequence
Link copied to clipboard
open fun fromList(parts: List<FormattedCharSequence>): FormattedCharSequence
Link copied to clipboard
open fun fromPair(first: FormattedCharSequence, second: FormattedCharSequence): FormattedCharSequence
Link copied to clipboard
open fun getChars(srcBegin: Int, srcEnd: Int, dst: Array<Char>, dstBegin: Int)
Link copied to clipboard
open fun getContents(): ComponentContents
Link copied to clipboard
open fun getSiblings(): List<Component>
Link copied to clipboard
open fun getString(): String
open fun getString(length: Int): String
Link copied to clipboard
open fun getStyle(): Style
Link copied to clipboard
open fun getVisualOrderText(): FormattedCharSequence
Link copied to clipboard
abstract fun hashCode(): Int
Link copied to clipboard
open fun isEmpty(): Boolean
Link copied to clipboard
open fun keybind(name: String): MutableComponent
Link copied to clipboard
open fun length(): Int
Link copied to clipboard
open fun literal(text: String): MutableComponent
Link copied to clipboard
open fun nbt(nbtPathPattern: String, interpreting: Boolean, seperator: Optional<Component>, dataSource: DataSource): MutableComponent
Link copied to clipboard
open fun nullToEmpty(text: @Nullable String): Component
Link copied to clipboard
open fun object(contents: ObjectInfo): MutableComponent
Link copied to clipboard
open fun of(content: String): PlainText
open fun of(content: String, formatting: ChatFormatting): PlainText
open fun of(content: String, style: Style): PlainText
open fun of(content: PlainTextContents, style: Style): PlainText
open fun of(text: String): FormattedText
Link copied to clipboard
open fun plainCopy(): MutableComponent
Link copied to clipboard
fun Component.sanitizeForeignInput(): Component

Sanitizes texts which are sent to the client.

Link copied to clipboard
open fun score(selectorPattern: SelectorPattern, objective: String): MutableComponent
Link copied to clipboard
open fun selector(selectorPattern: SelectorPattern, separator: Optional<Component>): MutableComponent
Link copied to clipboard
open fun string(): String
Link copied to clipboard
open fun subSequence(start: Int, end: Int): CharSequence
Link copied to clipboard
open fun toFlatList(): List<Component>
open fun toFlatList(style: Style): List<Component>
Link copied to clipboard
open fun toString(): String
Link copied to clipboard
fun FormattedCharSequence.toText(): 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
fun Component.translated(): Component
Link copied to clipboard
open fun translationArg(date: Date): Component
Link copied to clipboard
@Nullable
open fun tryCollapseToString(): @Nullable String
Link copied to clipboard
open fun <T> visit(visitor: FormattedText.ContentConsumer<T>): Optional<T>
open fun <T> visit(styledVisitor: FormattedText.StyledContentConsumer<T>, style: Style): Optional<T>