|
I've had a few potential ideas to fix this in a non-breaking way over the years. None of them are proper fixes and instead workarounds - and hence won't fix cancelling the event still removing the item. IMO that is still something that should be fixed, as not doing that goes against the concept of "cancelled".
As for my potential non-ideal but non-breaking solutions,
- Adding a method to get a snapshot of the original BlockState with the item still in the inventory
- Adding a method that provides the slot that the item was removed from. This allows the plugin to just add the removed item to that stack to get the original inventory state. Pretty hacky but works
I do feel that moving when this event is called is the best solution, but it is potentially breaking, especially for plugins that have attempted to work around this issue.
|