Class I18nModule
java.lang.Object
com.hypixel.hytale.server.core.plugin.PluginBase
com.hypixel.hytale.server.core.plugin.JavaPlugin
com.hypixel.hytale.server.core.modules.i18n.I18nModule
- All Implemented Interfaces:
CommandOwner
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Pathstatic final Stringstatic final Pathstatic final Stringprivate static I18nModulestatic final Stringstatic final PluginManifeststatic final StringFields inherited from class com.hypixel.hytale.server.core.plugin.PluginBase
METRICS_REGISTRY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddDefaultMessages(Map<String, String> messages, boolean isInitial) static I18nModuleget()getMessage(String language, String key) getMessages(String language) private StringgetUpdatePacketsForChanges(String languageKey, Map<String, Map<String, String>> changed, Map<String, Map<String, String>> removed) private intloadMessages(String languageKey, Path languagePath) private intprivate voidvoidsendTranslations(PacketHandler packetHandler, String language) protected voidsetup()protected voidstart()Methods inherited from class com.hypixel.hytale.server.core.plugin.JavaPlugin
getClassLoader, getFile, getType, start0Methods inherited from class com.hypixel.hytale.server.core.plugin.PluginBase
getAssetRegistry, getBasePermission, getBlockStateRegistry, getChunkStoreRegistry, getClientFeatureRegistry, getCodecRegistry, getCodecRegistry, getCodecRegistry, getCommandRegistry, getDataDirectory, getEntityRegistry, getEntityStoreRegistry, getEventRegistry, getIdentifier, getLogger, getManifest, getName, getState, getTaskRegistry, isDisabled, isEnabled, preLoad, setup0, shutdown, shutdown0, withConfig, withConfig
-
Field Details
-
MANIFEST
-
DEFAULT_LANGUAGE
- See Also:
-
FALLBACK_LANG_PATH
-
FILE_EXTENSION
- See Also:
-
SERVER_ASSETS
- See Also:
-
LANGUAGE_ASSETS
- See Also:
-
DEFAULT_GENERATED_PATH
-
instance
-
fallbacks
-
languages
-
cachedLanguages
-
-
Constructor Details
-
I18nModule
-
-
Method Details
-
get
-
setup
protected void setup()- Overrides:
setupin classPluginBase
-
start
protected void start()- Overrides:
startin classPluginBase
-
loadMessagesFromPack
-
getUpdatePacketsForChanges
-
addDefaultMessages
-
loadMessages
- Throws:
IOException
-
loadMessagesFrom
-
getPrefix
-
getMessages
-
getMessages
-
sendTranslations
-
getMessage
-