Class LanguageManager
java.lang.Object
me.wiefferink.interactivemessenger.source.LanguageManager
- All Implemented Interfaces:
MessageProvider
-
Constructor Summary
ConstructorDescriptionLanguageManager(JavaPlugin plugin, String jarLanguagePath, String currentLanguageName, String defaultLanguageName, List<String> chatPrefix)
Constructor -
Method Summary
Modifier and TypeMethodDescriptiongetMessage(String key)
Get the message for a certain key (result can be modified)
-
Constructor Details
-
LanguageManager
public LanguageManager(JavaPlugin plugin, String jarLanguagePath, String currentLanguageName, String defaultLanguageName, List<String> chatPrefix)Constructor- Parameters:
plugin
- The plugin creating this LanguageManager (used for logging and finding the language files in the jar)jarLanguagePath
- The path in the jar to the folder with the language filescurrentLanguageName
- The name of the language that should be active (without '.yml')defaultLanguageName
- The name of the language thatchatPrefix
- The chat prefix for Message#prefix()
-
-
Method Details
-
getMessage
Get the message for a certain key (result can be modified)- Specified by:
getMessage
in interfaceMessageProvider
- Parameters:
key
- The key of the message to get- Returns:
- The message as a list of strings
-