Class LanguageManager

java.lang.Object
me.wiefferink.interactivemessenger.source.LanguageManager
All Implemented Interfaces:
MessageProvider

public class LanguageManager extends Object implements MessageProvider
  • 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 files
      currentLanguageName - The name of the language that should be active (without '.yml')
      defaultLanguageName - The name of the language that
      chatPrefix - The chat prefix for Message#prefix()
  • Method Details

    • getMessage

      public List<String> getMessage(String key)
      Get the message for a certain key (result can be modified)
      Specified by:
      getMessage in interface MessageProvider
      Parameters:
      key - The key of the message to get
      Returns:
      The message as a list of strings