Add check for PlaceholderAPI before hooking into it.

https://github.com/BentoBoxWorld/bentobox/issues/322
This commit is contained in:
tastybento 2018-11-03 18:51:01 -07:00
parent 3e284b90eb
commit c7f253fddd

View File

@ -147,7 +147,10 @@ public class BentoBox extends JavaPlugin {
// Load hooks
hooksManager = new HooksManager(this);
hooksManager.registerHook(new VaultHook());
hooksManager.registerHook(new PlaceholderAPIHook());
if (getServer().getPluginManager().isPluginEnabled("PlaceholderAPI")
|| getServer().getPluginManager().isPluginEnabled("MVdWPlaceholderAPI")) {
hooksManager.registerHook(new PlaceholderAPIHook());
}
// Setup the Placeholders manager
placeholdersManager = new PlaceholdersManager(this);