currently this is the behavior for shift clicks:
first an InventoryPreClickEvent is called for the source inventory/slot. then for each slot in the target inventory capable of receiving the item, InventoryPreClickEvent is called. however the changes in clicked item and cursor item in both of these are ignored and only cancellation takes effect. then, for each changed slot InventoryClickEvent is called, without any event being called for the source slot.
this is the behavior I suggest:
an InventoryPreClickEvent is called with additional Inventory getTargetInventory(), Map<Integer, ItemStack> getChangeMap() and void setChangeMap(Map<Integer, ItemStack> changeMap) methods (either through a subclass InventoryPreShiftClickEvent or in the InventoryPreClickEvent class itself, returning null for other clicks). this event contains regular fields about the source slot/item/inventory, alongside the target inventory and its changes. both the source item and the change map can be replaced. then the changes are applied and an InventoryClickEvent is called with the applied changes.
currently this is the behavior for shift clicks: first an
InventoryPreClickEvent
is called for the source inventory/slot. then for each slot in the target inventory capable of receiving the item,InventoryPreClickEvent
is called. however the changes in clicked item and cursor item in both of these are ignored and only cancellation takes effect. then, for each changed slotInventoryClickEvent
is called, without any event being called for the source slot. this is the behavior I suggest: anInventoryPreClickEvent
is called with additionalInventory getTargetInventory()
,Map<Integer, ItemStack> getChangeMap()
andvoid setChangeMap(Map<Integer, ItemStack> changeMap)
methods (either through a subclassInventoryPreShiftClickEvent
or in theInventoryPreClickEvent
class itself, returning null for other clicks). this event contains regular fields about the source slot/item/inventory, alongside the target inventory and its changes. both the source item and the change map can be replaced. then the changes are applied and anInventoryClickEvent
is called with the applied changes.