From b8f6a055383cfde0eed3252e710d39534ad576aa Mon Sep 17 00:00:00 2001 From: Driftay Date: Fri, 3 Jan 2020 10:55:22 -0500 Subject: [PATCH] Re-added Mis-deleted code --- .../com/massivecraft/factions/cmd/audit/FChestListener.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/com/massivecraft/factions/cmd/audit/FChestListener.java b/src/main/java/com/massivecraft/factions/cmd/audit/FChestListener.java index a29b21d5..3415f1a6 100644 --- a/src/main/java/com/massivecraft/factions/cmd/audit/FChestListener.java +++ b/src/main/java/com/massivecraft/factions/cmd/audit/FChestListener.java @@ -36,7 +36,6 @@ public class FChestListener implements Listener { e.getWhoClicked().sendMessage(CC.RedB + "(!) " + CC.Red + "You cannot drag items while viewing a /f chest!"); } - @EventHandler( priority = EventPriority.HIGHEST, ignoreCancelled = true @@ -67,7 +66,7 @@ public class FChestListener implements Listener { if (event.getView().getTitle().equalsIgnoreCase(FactionsPlugin.getInstance().color(FactionsPlugin.getInstance().getConfig().getString("fchest.Inventory-Title")))) { if (currentItemType != Material.AIR) { Inventory ours = faction.getChestInventory(); - if (ours == null) { + if (ours == null || !ours.contains(currentItem)) { event.setCancelled(true); player.sendMessage(CC.RedB + "(!) That item not longer exists!"); Bukkit.getLogger().info("[FactionChest] " + player.getName() + " tried to remove " + currentItem + " from /f chest when it didnt contain! Items: " + (ours == null ? "none" : Arrays.toString(ours.getContents())));