LegacyTextSanitizer

class LegacyTextSanitizer(innerVisitor: FormattedText.StyledContentConsumer<Nothing>) : FormattedText.StyledContentConsumer<Nothing>

This is a utility class which degenerates legacy formatting which is contained in new minecraft formatting (i.e. {text: "§a§lYeet"}) into pure new formatting (i.e. {text: "Yeet", bold: true, color: "green"}).

Parameters

innerVisitor

the receiver of the degenerated text formatting.

Constructors

Link copied to clipboard
constructor(innerVisitor: FormattedText.StyledContentConsumer<Nothing>)

Types

Link copied to clipboard
class SanitizedLegacyText(text: Component) : FormattedCharSequence

Functions

Link copied to clipboard
open override fun accept(style: Style, text: String): Optional<Nothing>