diff --git a/pom.xml b/pom.xml index 89486320a..c40aa4122 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 org.maxgamer QuickShop - Reremake 1.3.5.2 + Reremake 1.3.5.3 diff --git a/src/main/java/org/maxgamer/quickshop/Listeners/ChatListener.java b/src/main/java/org/maxgamer/quickshop/Listeners/ChatListener.java index 58d891d37..e62ece113 100644 --- a/src/main/java/org/maxgamer/quickshop/Listeners/ChatListener.java +++ b/src/main/java/org/maxgamer/quickshop/Listeners/ChatListener.java @@ -5,6 +5,7 @@ import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.player.AsyncPlayerChatEvent; import org.maxgamer.quickshop.QuickShop; +import org.maxgamer.quickshop.Util.Util; /** * @@ -17,8 +18,12 @@ public class ChatListener implements Listener { public ChatListener(QuickShop plugin) { this.plugin = plugin; } - @EventHandler(priority = EventPriority.LOWEST,ignoreCancelled=true) + @EventHandler(priority = EventPriority.LOWEST) public void onChat(AsyncPlayerChatEvent e) { + if(e.isCancelled()&&plugin.getConfig().getBoolean("shop.ignore-cancel-chat-event")) { + Util.debugLog("Ignorr chat event (cancel by other plugin.)"); + return; + } if (!plugin.getShopManager().getActions().containsKey(e.getPlayer().getUniqueId())) { plugin.log(plugin.getShopManager().getActions().toString()); return; diff --git a/src/main/java/org/maxgamer/quickshop/QuickShop.java b/src/main/java/org/maxgamer/quickshop/QuickShop.java index 8ddd3c9db..e580ba865 100644 --- a/src/main/java/org/maxgamer/quickshop/QuickShop.java +++ b/src/main/java/org/maxgamer/quickshop/QuickShop.java @@ -746,6 +746,12 @@ public class QuickShop extends JavaPlugin { saveConfig(); reloadConfig(); } + if (selectedVersion == 16) { + getConfig().set("config-version", 16); + selectedVersion = 17; + saveConfig(); + reloadConfig(); + } } /** Reloads QuickShops config */ diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 59677cd52..49ce71a94 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -1,7 +1,7 @@ #Default config: https://github.com/KaiKikuchi/QuickShop/blob/master/src/main/resources/config.yml #Do not touch if you not clear know about this -config-version: 16 +config-version: 17 #Do not touch if you not know what is this dev-mode: false @@ -119,6 +119,8 @@ shop: #Allow auto fetch player shop, if you disable it ,Player need use /qs fetchmessage to fetch history shop messages. (Disable it may cause database size lost control.) auto-fetch-shop-messages: true + #Ignore cancel chat event, maybe can improve compatibility with other chat plugin. + ignore-cancel-chat-event: false #List of items to disallow selling of. Anyone with quickshop.bypass. can bypass it