Java:
@EventHandler
public void onClick(InventoryClickEvent e){
Bukkit.broadcastMessage(String.valueOf(e.getSlot()));
Bukkit.broadcastMessage(e.getClick().toString());
Bukkit.broadcastMessage(e.getAction().toString());
Bukkit.broadcastMessage(e.getCurrentItem().toString());
Bukkit.broadcastMessage(e.getCursor().toString());
if(e.getClickedInventory().getType() == InventoryType.CHEST && e.getCurrentItem().getType() == Material.CHEST){
e.setCancelled(true);
}
When double clicking on an item without holding shift the 3 clicks (from e.getClick()) are:
1. LEFT
2. LEFT
3. DOUBLE_CLICK
all good, you can filter out the 3rd so the event only fires 2 times when double clicking on an item
but when holding shift and double clicking the 3 clicks are:
1. SHIFT_LEFT
2. SHIFT_LEFT
3. SHIFT_LEFT
and theres no way to filter the 3rd one out, thats executed automatically
so my question is: is there a way to do this?