MineTinker icon indicating copy to clipboard operation
MineTinker copied to clipboard

Add MineTinkerReloadEvent

Open Flo56958 opened this issue 5 years ago • 0 comments

The way the plugin handles reloads is definitely not suitable for the size of it. Some config options do not get reloaded at all, some sometimes and others get reloaded in a really inelegant method call hierarchy.

There should be a Reload-Event called if the Plugin is reloaded so that every class can listen for a reload and deal with it accordingly.

  • [ ] Implement MTReloadEvent (maybe look into similar Bukkit Events if available)
  • [ ] Rewrite classes like ModManager, Modifiers, LanguageManager, ConfigurationManager, Updater, ChatWriter, ...
  • [ ] Use different EventPriorities to have a better reload structure
  • [ ] Make the CommandManager reloadable

Plugin Start-up Behaviour:

  1. Load Main-Config File
  2. Init and load Configuration Manager
  3. Init and load Language Manager
  4. Init Mod Manager
  5. Register other Listeners
  6. Load Core Modifiers
  7. Initiate Plugin Reload Event

Flo56958 avatar Jun 15 '20 23:06 Flo56958