From ea155cff7302d46a2b0b8af62f1db81f5531f613 Mon Sep 17 00:00:00 2001 From: KaiKikuchi Date: Fri, 25 Sep 2015 13:46:46 +0200 Subject: [PATCH] #10 Force bukkit chat handler option Added 'force-bukkit-chat-handler' to the config.yml --- src/main/java/org/maxgamer/quickshop/QuickShop.java | 2 +- src/main/resources/config.yml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/maxgamer/quickshop/QuickShop.java b/src/main/java/org/maxgamer/quickshop/QuickShop.java index 727deb4..210162c 100644 --- a/src/main/java/org/maxgamer/quickshop/QuickShop.java +++ b/src/main/java/org/maxgamer/quickshop/QuickShop.java @@ -266,7 +266,7 @@ public class QuickShop extends JavaPlugin { Bukkit.getServer().getPluginManager().registerEvents(chunkListener, this); } Bukkit.getServer().getPluginManager().registerEvents(worldListener, this); - if (Bukkit.getPluginManager().getPlugin("Herochat") != null) { + if (this.getConfig().getBoolean("force-bukkit-chat-handler", false) && Bukkit.getPluginManager().getPlugin("Herochat") != null) { this.getLogger().info("Found Herochat... Hooking!"); this.heroChatListener = new HeroChatListener(this); Bukkit.getServer().getPluginManager().registerEvents(heroChatListener, this); diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 3157b8d..d17ae7d 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -11,6 +11,9 @@ log-actions: true #For item-item based economies that don't use virtual coins. whole-number-prices-only: false +#Force bukkit chat handler (https://github.com/KaiKikuchi/QuickShop/issues/10) +force-bukkit-chat-handler: false + database: mysql: false host: localhost