Message - SimonFlash/TeslaPowered GitHub Wiki
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 Locale
s. 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.