From e0c54dfdfeee96d88fc8b84c0956980c36301737 Mon Sep 17 00:00:00 2001 From: Sotr Date: Mon, 29 Oct 2018 01:19:07 +0800 Subject: [PATCH] Ignore cancellation to avoid potential issues Former-commit-id: 1567cdb95276504f64420bcccc71183fc8fd9b01 --- .../org/maxgamer/quickshop/Listeners/ChatListener.java | 2 +- .../quickshop/Listeners/DisplayProtectionListener.java | 8 ++++---- .../org/maxgamer/quickshop/Listeners/LockListener.java | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/maxgamer/quickshop/Listeners/ChatListener.java b/src/main/java/org/maxgamer/quickshop/Listeners/ChatListener.java index eb745169b..afa16c333 100644 --- a/src/main/java/org/maxgamer/quickshop/Listeners/ChatListener.java +++ b/src/main/java/org/maxgamer/quickshop/Listeners/ChatListener.java @@ -18,7 +18,7 @@ public class ChatListener implements Listener { this.plugin = plugin; } - @EventHandler(priority = EventPriority.LOWEST) + @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true) public void onChat(final AsyncPlayerChatEvent e) { if (!plugin.getShopManager().getActions().containsKey(e.getPlayer().getUniqueId())) { plugin.log(plugin.getShopManager().getActions().toString()); diff --git a/src/main/java/org/maxgamer/quickshop/Listeners/DisplayProtectionListener.java b/src/main/java/org/maxgamer/quickshop/Listeners/DisplayProtectionListener.java index 249c5c8c3..978d3d854 100644 --- a/src/main/java/org/maxgamer/quickshop/Listeners/DisplayProtectionListener.java +++ b/src/main/java/org/maxgamer/quickshop/Listeners/DisplayProtectionListener.java @@ -21,7 +21,7 @@ public class DisplayProtectionListener implements Listener { this.plugin = plugin; } - @EventHandler + @EventHandler(ignoreCancelled = true) public void onInventoryOpen(InventoryOpenEvent event) { for (int i = 0; i