You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simon_Flash edited this page Nov 23, 2017
·
1 revision
Overview
The message package currently contains only the MessageService class, but it is intended to expand this to include various Text actions and handling arguments.
MessageService
The MessageService class provides an easy to use framework for handling message translations for different Locales. This class uses Guava's LoadingCache to load ResourceBundles from the given class loader. This can be used to load translations from the plugin's asset files in addition to a configuration folder.
Messages returned are wrapped inside the Formatter class, which provides a series of methods to replaces arguments in the retrieved methods. Arguments are currently expected to be contained inside the <> characters, but future updates will allow for more advanced methods of handling formatting.