From db1e3edb4ea6b62bc7ab2b1c09936146e7dfee37 Mon Sep 17 00:00:00 2001 From: 502647092 Date: Mon, 30 Nov 2015 16:26:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88=E7=82=B9=E5=87=BB=E7=9B=91?= =?UTF-8?q?=E5=90=AC...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 502647092 --- .../MenuProtect/listen/ProtectListener.java | 32 +++++++++---------- src/main/resources/config.yml | 2 +- src/main/resources/plugin.yml | 2 +- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/main/java/cn/citycraft/MenuProtect/listen/ProtectListener.java b/src/main/java/cn/citycraft/MenuProtect/listen/ProtectListener.java index f247270..acf5fc6 100644 --- a/src/main/java/cn/citycraft/MenuProtect/listen/ProtectListener.java +++ b/src/main/java/cn/citycraft/MenuProtect/listen/ProtectListener.java @@ -5,11 +5,9 @@ import org.bukkit.Material; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; -import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.event.inventory.InventoryPickupItemEvent; import org.bukkit.event.player.PlayerItemHeldEvent; import org.bukkit.event.player.PlayerPickupItemEvent; -import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.PlayerInventory; @@ -32,20 +30,22 @@ public class ProtectListener implements Listener { } } - @EventHandler - public void onItemClick(final InventoryClickEvent e) { - final Player p = (Player) e.getWhoClicked(); - final ItemStack ci = e.getCurrentItem(); - final Inventory inv = e.getInventory(); - final int solt = e.getSlot(); - try { - if (MarkUtil.hasMark(ci)) { - inv.setItem(solt, new ItemStack(Material.AIR)); - p.closeInventory(); - } - } catch (final Exception ex) { - } - } + /* + * @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) + * public void onItemClick(final InventoryClickEvent e) { + * final Player p = (Player) e.getWhoClicked(); + * final ItemStack ci = e.getCurrentItem(); + * final Inventory inv = e.getInventory(); + * final int solt = e.getSlot(); + * try { + * if (MarkUtil.hasMark(ci)) { + * inv.setItem(solt, new ItemStack(Material.AIR)); + * p.closeInventory(); + * } + * } catch (final Exception ex) { + * } + * } + */ @EventHandler public void onPlayerHandlerItem(final PlayerItemHeldEvent e) { diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 885d67f..22cbeb0 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -1,3 +1,3 @@ MarkList: - '§m§p§r' - - '§q§s§6[§b快捷商店§6] §c悬浮物品§r' \ No newline at end of file + - '§q§s§6[§b快捷商店§6] §c悬浮物品§r' diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index bab8545..c15b9f7 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -6,7 +6,7 @@ author: 喵♂呜 website: ${jenkins.url}/job/${project.artifactId}/ commands: ${project.artifactId}: - description: ${project.artifactId} + description: ${project.artifactId} - ${project.description} usage: §b使用/${project.artifactId} help 查看帮助! permission: ${project.artifactId}.reload permission-message: §c你没有 的权限来执行此命令!