box settings given players free items
Expected behavior
For the items to not be given from the menu
Observed/Actual behavior
Items are given from the menu
Steps/models to reproduce
Fill up your hotbar with any block ext: 9 dirt Do /box settings go on expert mode click 1-9 on your keyboard while hovering over an item on the menu it will give you the item that you now selected in your hotbar
https://github.com/user-attachments/assets/fd9975f3-3db2-4f80-a809-19dd2242ab67
BentoBox version
2.4.0-SNAPSHOT-b2651
Plugin list
Other
No response
After doing a binary test, I determined this root cause is StackableItems https://github.com/haveric/StackableItems
I cannot find any other menus that exhibit this behavior with StackableItems installed, is there anything different about how BentoBox handles the box settings menu that could cause the items to be taken out when the server has StackableItems installed?
I believe because BentoBox's priority for the inventory click event is set to highest
Or maybe the issue is that they are listening for cancelled events? BentoBox cancels it, and they still use it? Not 100% sure tho...
@tastybento , we could change to the same level as DeluxeMenu is using: EventPriority.LOW
It's because StackableItems also sets their inventory click listeners to HIGHEST so there can be a race condition where they and us run differently.
This happens every so often and I think we've change priority a few times but yes, in theory if we change to something, NORMAL or even MONITOR it should work. Let's see.
Shifted the event priority to LOW.
@wschris1 Can you confirm that this fixed the problem?