Search in sources :

Example 1 with LocalizedText

use of org.lanternpowered.server.network.objects.LocalizedText in project LanternServer by LanternPowered.

the class ChatTypeRegistryModule method registerDefaults.

@Override
public void registerDefaults() {
    register(new LanternChatType("minecraft", "chat", (text, locale) -> new MessagePlayOutChatMessage(new LocalizedText(text, locale), MessagePlayOutChatMessage.Type.CHAT)));
    register(new LanternChatType("minecraft", "action_bar", (text, locale) -> new MessagePlayOutTitle.SetActionbarTitle(new LocalizedText(text, locale))));
    register(new LanternChatType("minecraft", "system", (text, locale) -> new MessagePlayOutChatMessage(new LocalizedText(text, locale), MessagePlayOutChatMessage.Type.SYSTEM)));
}
Also used : ChatTypes(org.spongepowered.api.text.chat.ChatTypes) LocalizedText(org.lanternpowered.server.network.objects.LocalizedText) MessagePlayOutChatMessage(org.lanternpowered.server.network.vanilla.message.type.play.MessagePlayOutChatMessage) MessagePlayOutTitle(org.lanternpowered.server.network.vanilla.message.type.play.MessagePlayOutTitle) AdditionalPluginCatalogRegistryModule(org.lanternpowered.server.game.registry.AdditionalPluginCatalogRegistryModule) LanternChatType(org.lanternpowered.server.text.chat.LanternChatType) ChatType(org.spongepowered.api.text.chat.ChatType) MessagePlayOutChatMessage(org.lanternpowered.server.network.vanilla.message.type.play.MessagePlayOutChatMessage) LanternChatType(org.lanternpowered.server.text.chat.LanternChatType) LocalizedText(org.lanternpowered.server.network.objects.LocalizedText)

Aggregations

AdditionalPluginCatalogRegistryModule (org.lanternpowered.server.game.registry.AdditionalPluginCatalogRegistryModule)1 LocalizedText (org.lanternpowered.server.network.objects.LocalizedText)1 MessagePlayOutChatMessage (org.lanternpowered.server.network.vanilla.message.type.play.MessagePlayOutChatMessage)1 MessagePlayOutTitle (org.lanternpowered.server.network.vanilla.message.type.play.MessagePlayOutTitle)1 LanternChatType (org.lanternpowered.server.text.chat.LanternChatType)1 ChatType (org.spongepowered.api.text.chat.ChatType)1 ChatTypes (org.spongepowered.api.text.chat.ChatTypes)1