Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

box settings given players free items #2433

Open
wschris1 opened this issue Jul 15, 2024 · 7 comments
Open

box settings given players free items #2433

wschris1 opened this issue Jul 15, 2024 · 7 comments
Assignees
Labels
Status: Done This issue has been completed or answered. This pull request has been merged. Type: Conflict Issue is likely caused by another plugin

Comments

@wschris1
Copy link

wschris1 commented Jul 15, 2024

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

2024-07-15.19-09-59.mp4

BentoBox version

2.4.0-SNAPSHOT-b2651

Plugin list

Other

No response

@wschris1
Copy link
Author

wschris1 commented Jul 16, 2024

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?

@Projecki
Copy link

I believe because BentoBox's priority for the inventory click event is set to highest

@BONNe
Copy link
Member

BONNe commented Jul 16, 2024

Or maybe the issue is that they are listening for cancelled events? BentoBox cancels it, and they still use it? Not 100% sure tho...

@BONNe BONNe transferred this issue from BentoBoxWorld/Boxed Jul 16, 2024
@BONNe
Copy link
Member

BONNe commented Jul 16, 2024

@tastybento , we could change to the same level as DeluxeMenu is using:
EventPriority.LOW

@tastybento
Copy link
Member

tastybento commented Jul 16, 2024

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.

@tastybento tastybento added Status: Under investigation Investigating the interest and the feasability of the issue. Type: Conflict Issue is likely caused by another plugin labels Jul 17, 2024
@tastybento tastybento self-assigned this Jul 17, 2024
tastybento added a commit that referenced this issue Jul 17, 2024
…t_priority

Shift InventoryClickEvent listener to LOW priority #2433
@tastybento tastybento added Status: Done This issue has been completed or answered. This pull request has been merged. and removed Status: Under investigation Investigating the interest and the feasability of the issue. labels Jul 17, 2024
@tastybento
Copy link
Member

Shifted the event priority to LOW.

@tastybento
Copy link
Member

@wschris1 Can you confirm that this fixed the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Done This issue has been completed or answered. This pull request has been merged. Type: Conflict Issue is likely caused by another plugin
Projects
None yet
Development

No branches or pull requests

4 participants