Search in sources :

Example 1 with FormattingCodeTextSerializer

use of org.lanternpowered.server.text.FormattingCodeTextSerializer in project LanternServer by LanternPowered.

the class TextSerializersRegistryModule method registerDefaults.

@EarlyRegistration
@Override
public void registerDefaults() {
    register(new PlainTextSerializer("minecraft", "plain"));
    register(new FormattingCodeTextSerializer("minecraft", "legacy_formatting_code", TextConstants.LEGACY_CHAR));
    register(new FormattingCodeTextSerializer("minecraft", "formatting_code", '&'));
    register(new LanternJsonTextSerializer("minecraft", "json", Lantern.getGame().getRegistry().getRegistryModule(TranslationManagerRegistryModule.class).get().getTranslationManager()));
}
Also used : PlainTextSerializer(org.lanternpowered.server.text.PlainTextSerializer) FormattingCodeTextSerializer(org.lanternpowered.server.text.FormattingCodeTextSerializer) LanternJsonTextSerializer(org.lanternpowered.server.text.gson.LanternJsonTextSerializer) EarlyRegistration(org.lanternpowered.server.game.registry.EarlyRegistration)

Aggregations

EarlyRegistration (org.lanternpowered.server.game.registry.EarlyRegistration)1 FormattingCodeTextSerializer (org.lanternpowered.server.text.FormattingCodeTextSerializer)1 PlainTextSerializer (org.lanternpowered.server.text.PlainTextSerializer)1 LanternJsonTextSerializer (org.lanternpowered.server.text.gson.LanternJsonTextSerializer)1