Interface MessageManager


public interface MessageManager
  • Method Details

    • getMessage

      String getMessage(String path, Locale locale)
      Gets a messaged defined in an AuraSkills messages file for a given path and locale.
      Parameters:
      path - the path to the message, with periods separating sections
      locale - the locale/language to get the message in
      Returns:
      The message in the given locale, or the default language if missing. If no languages contain the specified path, the path will be returned back unchanged.
    • getSkillDisplayName

      String getSkillDisplayName(Skill skill, Locale locale)
      Gets the user-configured display name for a skill in a given language.
      Parameters:
      skill - the skill whose name to get
      locale - the language, will use default if not found
      Returns:
      the skill display name
    • getSkillDescription

      String getSkillDescription(Skill skill, Locale locale)
      Gets the user-configured description as shown in in-game menus for a skill in a given language.
      Parameters:
      skill - the skill whose description to get
      locale - the language, will use default if not found
      Returns:
      the skill description
    • getStatDisplayName

      String getStatDisplayName(Stat stat, Locale locale)
      Gets the user-configured display name for a stat in a given language.
      Parameters:
      stat - the stat whose name to get
      locale - the language, will use default if not found
      Returns:
      the stat display name
    • getStatDescription

      String getStatDescription(Stat stat, Locale locale)
      Gets the user-configured description as shown in in-game menus for a stat in a given language.
      Parameters:
      stat - the stat whose description to get
      locale - the language, will use default if not found
      Returns:
      the stat display name
    • getDefaultLanguage

      Locale getDefaultLanguage()
      Gets the default language of the plugin as specified by the config, which is Locale.ENGLISH if unchanged.
      Returns:
      the default language
    • toPluralForm

      String toPluralForm(String word)
      Utility method to convert a word to its plural form, following English grammar rules.
      Parameters:
      word - the world to convert
      Returns:
      the plural form