convertToJson

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

Return

A JSON string representing the converted text component.

Parameters

source

The source McCommandSource to determine the server's language.

text

The McTextComponent to be converted.


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

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

Return

A server-specific implementation of type T representing the converted text component.

Parameters

language

The server's language.

text

The McTextComponent to be converted.