ServerTextConverter

Functions

Link copied to clipboard
open fun convert(list: List<McTextComponent>): List<T>?

Converts a list of McTextComponent objects into a list of server-specific implementations of type T.

abstract fun convert(text: McTextComponent): T

Converts a single McTextComponent into a server-specific implementation of type T.

abstract fun convert(language: String, text: McTextComponent): T
open fun convert(source: McCommandSource, text: McTextComponent): T

Converts a McTextComponent to a server-specific implementation while considering the server languages.

Link copied to clipboard
abstract fun convertFromJson(json: String): T

Converts a JSON string to a value of type T.

Link copied to clipboard
abstract fun convertToJson(text: T): String

Converts a value of type T to a JSON string.

Converts a McTextComponent to a JSON string.

abstract fun convertToJson(language: String, text: McTextComponent): String

Converts a McTextComponent to a server-specific implementation while considering the server languages.

Converts a McTextComponent to a JSON string while considering the server languages.