From 14747f9147d83cec6f859086fcfa91819f0ee950 Mon Sep 17 00:00:00 2001 From: Ghost_chu <2908803755@qq.com> Date: Sat, 6 Oct 2018 22:44:55 +0800 Subject: [PATCH] Not call interact event, Because it still make can't created items Former-commit-id: 0d239edfa5478d87a349c52feee3edb0504b582b --- src/main/java/org/maxgamer/quickshop/Command/QS.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/main/java/org/maxgamer/quickshop/Command/QS.java b/src/main/java/org/maxgamer/quickshop/Command/QS.java index 99cb1c5df..bb0128402 100644 --- a/src/main/java/org/maxgamer/quickshop/Command/QS.java +++ b/src/main/java/org/maxgamer/quickshop/Command/QS.java @@ -293,12 +293,6 @@ public class QS implements CommandExecutor { Block b = bIt.next(); if (Util.canBeShop(b)) { if (p != null && b != null && p.isOnline()) { - PlayerInteractEvent e = new PlayerInteractEvent(p, Action.LEFT_CLICK_BLOCK, item, b, - BlockFace.UP); - Bukkit.getPluginManager().callEvent(e); - if (e.isCancelled()) { - return; - } BlockBreakEvent be = new BlockBreakEvent(b, p); Bukkit.getPluginManager().callEvent(be); if (be.isCancelled()) { @@ -326,7 +320,7 @@ public class QS implements CommandExecutor { if (args.length < 2) { // Send creation menu. - Info info = new Info(b.getLocation(), ShopAction.CREATE, p.getItemInHand(), + Info info = new Info(b.getLocation(), ShopAction.CREATE, p.getInventory().getItemInMainHand(), b.getRelative(Util.getYawFace(p.getLocation().getYaw()))); plugin.getShopManager().getActions().put(p.getUniqueId(), info); p.sendMessage(