GenerateDefaultLanguageEvent
Package:
com.hypixel.hytale.server.core.modules.i18n.eventImplements:IEvent<Void>Cancellable: No
Standard event dispatched during default language generation for the i18n system. Listeners can contribute translation files by calling putTranslationFile().
Fields / Accessors
Section titled “Fields / Accessors”| Field | Type | Accessor | Mutable | Nullable |
|---|---|---|---|---|
translationFiles | ConcurrentHashMap<String,TranslationMap> | — | No | No |
- translationFiles — The concurrent map of translation file names to translation maps. Accessible via
putTranslationFile(String, TranslationMap).
Methods
Section titled “Methods”putTranslationFile(String filename, TranslationMap translations)
Section titled “putTranslationFile(String filename, TranslationMap translations)”Adds a translation file to the default language generation. The filename and translations must not be null.
Fired By
Section titled “Fired By”Dispatch location not identified in decompiled source. This event may be dispatched by game modules not yet mapped.
Listening
Section titled “Listening”getEventRegistry().register(GenerateDefaultLanguageEvent.class, event -> { TranslationMap myTranslations = new TranslationMap(); myTranslations.put("myplugin.greeting", "Hello, World!"); event.putTranslationFile("myplugin.lang", myTranslations);});Related Events
Section titled “Related Events”MessagesUpdated— Fired when translation messages are updated at runtime.