Fix players being able to illegally interact with a skyblock inventory

This commit is contained in:
Esophose 2019-02-26 03:33:51 -07:00
parent fac0997c97
commit 92846d2d75

View File

@ -50,12 +50,12 @@ public class nInventoryUtil {
}
if (inv != null && event.getInventory().equals(inv)) {
event.setCancelled(true);
if (event.getCurrentItem() == null || event.getCurrentItem().getType() == Material.AIR) {
return;
}
event.setCancelled(true);
ClickEvent clickEvent = new ClickEvent(event.getClick(), event.getSlot(),
event.getCurrentItem());
handler.onClick(clickEvent);