Moves placeholder manager initialization to before addon loading

This enables addons to register placeholders when they are enabled.
This commit is contained in:
tastybento 2019-02-02 12:29:16 -08:00
parent 8b2ca8db23
commit ae9e030aae

View File

@ -142,6 +142,8 @@ public class BentoBox extends JavaPlugin {
hooksManager = new HooksManager(this);
hooksManager.registerHook(new VaultHook());
hooksManager.registerHook(new PlaceholderAPIHook());
// Setup the Placeholders manager
placeholdersManager = new PlaceholdersManager(this);
// Load addons. Addons may load worlds, so they must go before islands are loaded.
addonsManager = new AddonsManager(this);
@ -176,9 +178,6 @@ public class BentoBox extends JavaPlugin {
hooksManager.registerHook(new MultiverseCoreHook());
islandWorldManager.registerWorldsToMultiverse();
// Setup the Placeholders manager
placeholdersManager = new PlaceholdersManager(this);
// Show banner
User.getInstance(Bukkit.getConsoleSender()).sendMessage("successfully-loaded",
TextVariables.VERSION, instance.getDescription().getVersion(),