Open dawon opened 1 month ago
The general issue here is that these events trigger too deep in the call stack to be able to properly revert what happened where the call occurred, we'd need to figure out how to safely pass the cancellation back up the stack so that the operation can actually be reverted
Expected behavior
When Item drop is cancelled the item stack affected should not be changed in any way
Observed/Actual behavior
When item is dropped from inside inventory this is cancelled, the item is readded into selected slot instead of original itemstack/slot
Steps/models to reproduce
prepare plugin cancelling all PlayerDropItemEvents 1) get a stack of any item (
/give @p minecraft:dirt 64
) and have it in first slot 2) select any other slot 3.a) open inventory and drop one of the items using q and hovering the item stack 3.b) right-click the item and drop it outside of the inventory 3.c) left-click the item and drop it outside of inventoryPlugin and Datapack List
only the test plugin cancelling the drop events
Paper version
This server is running Paper version 1.20.6-137-master@bd5867a (2024-06-04T21:04:28Z) (Implementing API version 1.20.6-R0.1-SNAPSHOT) You are running the latest version
Other
No response