Load hooks before loading addons

Fixes #489.
This commit is contained in:
Florian CUNY 2019-01-26 15:29:18 +01:00
parent 6155a8cf80
commit b07d7ba3af

View File

@ -137,6 +137,12 @@ public class BentoBox extends JavaPlugin {
// Locales manager must be loaded before addons // Locales manager must be loaded before addons
localesManager = new LocalesManager(this); localesManager = new LocalesManager(this);
// Load hooks
hooksManager = new HooksManager(this);
hooksManager.registerHook(new VaultHook());
hooksManager.registerHook(new PlaceholderAPIHook());
hooksManager.registerHook(new MultiverseCoreHook());
// Load addons. Addons may load worlds, so they must go before islands are loaded. // Load addons. Addons may load worlds, so they must go before islands are loaded.
addonsManager = new AddonsManager(this); addonsManager = new AddonsManager(this);
addonsManager.loadAddons(); addonsManager.loadAddons();
@ -165,12 +171,6 @@ public class BentoBox extends JavaPlugin {
metrics.registerMetrics(); metrics.registerMetrics();
} }
// Load hooks
hooksManager = new HooksManager(this);
hooksManager.registerHook(new VaultHook());
hooksManager.registerHook(new PlaceholderAPIHook());
hooksManager.registerHook(new MultiverseCoreHook());
// Make sure all worlds are already registered to Multiverse. // Make sure all worlds are already registered to Multiverse.
islandWorldManager.registerWorldsToMultiverse(); islandWorldManager.registerWorldsToMultiverse();