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:
Andreas Troelsen
2017-03-10 23:32:52 +01:00
parent 5d6a7768e8
commit 56dc504bec
54 changed files with 271 additions and 237 deletions
+2 -1
View File
@@ -1,3 +1,4 @@
enabled: true
allowed-commands: /list, /pl
update-notification: true
update-notification: true
prefix: '&a[MobArena] '