From c7f253fddd6a3e2158d0ee6b5b164fed62f3db5c Mon Sep 17 00:00:00 2001 From: tastybento Date: Sat, 3 Nov 2018 18:51:01 -0700 Subject: [PATCH] Add check for PlaceholderAPI before hooking into it. https://github.com/BentoBoxWorld/bentobox/issues/322 --- src/main/java/world/bentobox/bentobox/BentoBox.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/world/bentobox/bentobox/BentoBox.java b/src/main/java/world/bentobox/bentobox/BentoBox.java index 8b41a6c2c..0178d6527 100644 --- a/src/main/java/world/bentobox/bentobox/BentoBox.java +++ b/src/main/java/world/bentobox/bentobox/BentoBox.java @@ -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);