How to get left or rightclick in inventory

Hello. Is there a way to get a leftclick, rightlick or shift + leftclick action in an opened inventory?

Thanks for help!

What’s your goal?

If you want to create a custom inventory, try this: Inventory · SimonFlash/TeslaPowered Wiki · GitHub Simon_Flash / TeslaPowered

For listening to click events in inventories in general, have a look at these:

My goal is to deactivate shift + leftclick crafting

The official way is to use the nested events in the click inventory event.

Something like


There are many nested interfaces so take a look at the last link RandomByte left

Plus some docs on events in general: Events — Sponge 7.2.0 documentation Cancel the shift primary (left) click.