Auto pickup cancelling BlockBreakEvent
datatags opened this issue ยท 4 comments
Hello, I was wondering if there is a specific reason the BlockBreakEvent is cancelled when auto pickup works. (https://github.com/PrisonTeam/Prison/blob/master/prison-spigot/src/main/java/tech/mcprison/prison/spigot/autofeatures/AutoManagerFeatures.java)
The reason I'm asking is that it breaks plugins that only run code if the event wasn't cancelled, specifically my plugin CommandMineRewards. If you can proceed without cancelling it that would be great, or if you have a workaround for it, that could work too. CMR cannot just run even when the event is cancelled because it should not issue rewards if the block doesn't actually break.
Thanks!
Because if the event is not canceled then it would result in a double drop... a normal drop and a second drop in the players inventory.
That's why the event gets canceled. It must.
Please visit our discord server and you can DM me directly (RoyalBlueRanger). I'd be happy to talk to you about this and see if there is some kind of a work around on either side of things
Does event.getDrops().clear() not prevent the items from dropping?
I don't really do discord, sorry
There're tons of issues when using it, sometimes it doesn't even cancel drops and others cancel the whole world drops.
We're working on some fixes right now, so maybe this won't be an issue in the future.