Refactor Messenger to allow for custom prefixes.
- Messenger no longer has a static nature and must be instantiated to be used. The prefix is provided in the constructor. - MobArena instantiates a global Messenger in onEnable() with a prefix string from global-settings. This instance is used by anything that isn't arena-specific, as well as for arenas with no prefix. - ArenaImpl instantiates a local Messenger in its constructor if, and only if, its arena-specific prefix setting is non-empty. Otherwise it uses the plugin's global instance.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
enabled: true
|
||||
allowed-commands: /list, /pl
|
||||
update-notification: true
|
||||
update-notification: true
|
||||
prefix: '&a[MobArena] '
|
||||
Reference in New Issue
Block a user