Expected behavior
Items should not be removed
Observed/Actual behavior
Items are removed
Steps/models to reproduce
In the PlayerInteractEvent listener, you need to update the item in the player's hand, and in the BlockPlaceEvent listener, you need to cancel the event. Since the block isn't being placed, the item shouldn't be removed, but it is being removed.
Plugin and Datapack List
none
Paper version
latest 26.1.2
Other
https://youtu.be/yBz6xdmOukU
Expected behavior
Items should not be removed
Observed/Actual behavior
Items are removed
Steps/models to reproduce
In the PlayerInteractEvent listener, you need to update the item in the player's hand, and in the BlockPlaceEvent listener, you need to cancel the event. Since the block isn't being placed, the item shouldn't be removed, but it is being removed.
Plugin and Datapack List
none
Paper version
latest 26.1.2
Other
https://youtu.be/yBz6xdmOukU