Interface MessageManager
public interface MessageManager
-
Method Summary
Modifier and TypeMethodDescriptionGets the default language of the plugin as specified by the config, which isLocale.ENGLISH
if unchanged.getMessage
(String path, Locale locale) Gets a messaged defined in an AuraSkills messages file for a given path and locale.getSkillDescription
(Skill skill, Locale locale) Gets the user-configured description as shown in in-game menus for a skill in a given language.getSkillDisplayName
(Skill skill, Locale locale) Gets the user-configured display name for a skill in a given language.getStatDescription
(Stat stat, Locale locale) Gets the user-configured description as shown in in-game menus for a stat in a given language.getStatDisplayName
(Stat stat, Locale locale) Gets the user-configured display name for a stat in a given language.toPluralForm
(String word) Utility method to convert a word to its plural form, following English grammar rules.
-
Method Details
-
getMessage
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 sectionslocale
- 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
Gets the user-configured display name for a skill in a given language.- Parameters:
skill
- the skill whose name to getlocale
- the language, will use default if not found- Returns:
- the skill display name
-
getSkillDescription
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 getlocale
- the language, will use default if not found- Returns:
- the skill description
-
getStatDisplayName
Gets the user-configured display name for a stat in a given language.- Parameters:
stat
- the stat whose name to getlocale
- the language, will use default if not found- Returns:
- the stat display name
-
getStatDescription
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 getlocale
- 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 isLocale.ENGLISH
if unchanged.- Returns:
- the default language
-
toPluralForm
Utility method to convert a word to its plural form, following English grammar rules.- Parameters:
word
- the world to convert- Returns:
- the plural form
-