Class LanguageManager

java.lang.Object
uk.radialbog9.spigot.manhunt.language.LanguageManager

public class LanguageManager extends Object
  • Constructor Details

    • LanguageManager

      public LanguageManager()
  • Method Details

    • getProperty

      public String getProperty(String key, String defaultValue)
      Gets the property from the language map. If the property does not exist, the default value is returned.
      Parameters:
      key - The key to get
      defaultValue - The default value to return if the key does not exist
      Returns:
      The value of the key or the default value if the key does not exist
    • getProperty

      public String getProperty(String key)
      Gets the property from the language map.
      Parameters:
      key - The key to get
      Returns:
      The value of the key or null if the key does not exist
    • loadLanguage

      public void loadLanguage(Properties languageProperties)
      Loads the language properties into the language map. This will replace any existing properties.
      Parameters:
      languageProperties - The language properties to load
    • loadLanguage

      public void loadLanguage(Map<String,String> languageProperties)
    • setProperty

      public void setProperty(String key, String value)
      Sets a property in the language map. This will replace any existing property with the same key.
      Parameters:
      key - the key to set
      value - the value to set