From 93b6cd4ebc64a773bd6805e0d3a59b879700d4ff Mon Sep 17 00:00:00 2001 From: Isaac Date: Sun, 25 Jun 2017 01:03:39 +0200 Subject: [PATCH] Fixed a bug with ClickableItem not called. --- src/main/java/fr/minuskube/inv/InventoryManager.java | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/main/java/fr/minuskube/inv/InventoryManager.java b/src/main/java/fr/minuskube/inv/InventoryManager.java index 2029eacc..09d3b72b 100644 --- a/src/main/java/fr/minuskube/inv/InventoryManager.java +++ b/src/main/java/fr/minuskube/inv/InventoryManager.java @@ -5,7 +5,6 @@ import fr.minuskube.inv.opener.InventoryOpener; import fr.minuskube.inv.opener.SpecialInventoryOpener; import org.bukkit.Bukkit; -import org.bukkit.Material; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -139,15 +138,7 @@ public void onInventoryClick(InventoryClickEvent e) { .filter(listener -> listener.getType() == InventoryClickEvent.class) .forEach(listener -> ((InventoryListener) listener).accept(e)); - contents.get(p).get(row, column).ifPresent(item -> { - if(item.getItem() != null && !item.getItem().isSimilar(e.getCurrentItem())) - return; - if(item.getItem() == null - && (e.getCurrentItem() != null && e.getCurrentItem().getType() != Material.AIR)) - return; - - item.run(e); - }); + contents.get(p).get(row, column).ifPresent(item -> item.run(e)); } }