mobarena / MobArenaStats

An extension plugin for MobArena that collects arena session stats.
GNU General Public License v3.0
3 stars 2 forks source link

Refactor plugin instance Singleton anti-pattern in commands #6

Closed garbagemule closed 2 years ago

garbagemule commented 3 years ago

Because MobArena doesn't currently offer a way to register pre-instantiated subcommands, the MobArenaStats subcommands all resort to the Singleton anti-pattern to get a hold of their dependencies via the main plugin class. If we could get rid of the Singletons, it would be much easier to test command execution.

Depends on https://github.com/garbagemule/MobArena/issues/675

garbagemule commented 3 years ago

This has been implemented on the dev branch, and will be merged into master when MobArena 0.107 is released.