1
0
mirror of https://e.coding.net/circlecloud/QuickShop.git synced 2024-11-22 01:58:54 +00:00

Hopefully fixes #5

This commit is contained in:
KaiKikuchi 2015-08-29 01:20:21 +02:00
parent fa084634a0
commit 7e73d8dcee

View File

@ -1,7 +1,6 @@
package org.maxgamer.quickshop.Listeners; package org.maxgamer.quickshop.Listeners;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
import org.bukkit.event.player.AsyncPlayerChatEvent; import org.bukkit.event.player.AsyncPlayerChatEvent;
import org.maxgamer.quickshop.QuickShop; import org.maxgamer.quickshop.QuickShop;
@ -18,10 +17,11 @@ public class ChatListener implements Listener {
this.plugin = plugin; this.plugin = plugin;
} }
@EventHandler(ignoreCancelled = true, priority = EventPriority.LOWEST) @EventHandler
public void onChat(final AsyncPlayerChatEvent e) { public void onChat(final AsyncPlayerChatEvent e) {
if (!plugin.getShopManager().getActions().containsKey(e.getPlayer().getUniqueId())) if (!plugin.getShopManager().getActions().containsKey(e.getPlayer().getUniqueId())) {
return; return;
}
plugin.getShopManager().handleChat(e.getPlayer(), e.getMessage()); plugin.getShopManager().handleChat(e.getPlayer(), e.getMessage());
e.setCancelled(true); e.setCancelled(true);
} }