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你没有 的权限来执行此命令!