InventoryGui
InventoryGui copied to clipboard
GuiStorageElement setStoreAction
When interacted with gui storage element, we should be able to handle the event
What exactly is your use case? Because there is already a GuiStorageElement#setApplyStorage(Runnable)
with which you can define what should happen whenever an item was changed. Theoretically one could also back the element with a custom Inventory class to get even more information about what is changed.
How does the runnable have the contexts when an item was changed? Could you share an example?
Currently there is no context, it's meant to be used to save the whole inventory. I guess it could be possible to expose some more information about which item changed there in that but that should already be possible by simply using a custom class which implements Bukkit's Inventory