Skip to content

Commit

Permalink
Fixed a bug with ClickableItem not called.
Browse files Browse the repository at this point in the history
  • Loading branch information
MinusKube committed Jun 24, 2017
1 parent 2c47da7 commit 93b6cd4
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/main/java/fr/minuskube/inv/InventoryManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -139,15 +138,7 @@ public void onInventoryClick(InventoryClickEvent e) {
.filter(listener -> listener.getType() == InventoryClickEvent.class)
.forEach(listener -> ((InventoryListener<InventoryClickEvent>) 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));
}
}

Expand Down

0 comments on commit 93b6cd4

Please sign in to comment.