Search in sources :

Example 6 with EarlyRegistration

use of org.lanternpowered.server.game.registry.EarlyRegistration 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)6 Field (java.lang.reflect.Field)1 AssetRepository (org.lanternpowered.server.asset.AssetRepository)1 LanternBanType (org.lanternpowered.server.config.user.ban.LanternBanType)1 FormattingCodeTextSerializer (org.lanternpowered.server.text.FormattingCodeTextSerializer)1 PlainTextSerializer (org.lanternpowered.server.text.PlainTextSerializer)1 LanternTextColor (org.lanternpowered.server.text.format.LanternTextColor)1 LanternTextStyle (org.lanternpowered.server.text.format.LanternTextStyle)1 LanternJsonTextSerializer (org.lanternpowered.server.text.gson.LanternJsonTextSerializer)1 CombinedTranslationManager (org.lanternpowered.server.text.translation.CombinedTranslationManager)1 LanternTranslationManager (org.lanternpowered.server.text.translation.LanternTranslationManager)1 MinecraftTranslationManager (org.lanternpowered.server.text.translation.MinecraftTranslationManager)1 TextColor (org.spongepowered.api.text.format.TextColor)1 Color (org.spongepowered.api.util.Color)1