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

Fix GUI Item Input Buttons deleting stacks on certain interactions #286

Merged
merged 4 commits into from
Jun 20, 2023

Conversation

WolfyScript
Copy link
Owner

This requires the next WolfyUtils 4.16.12-beta.2 to properly fix the issue

This keeps track of Item Input Button slots in custom GUIs that are actually updated and only updates those. So non-interacted slots are kept as is and stacks are not removed.

Because Spigot has no API to get the affected slots of the action we need to figure it out manually.
In order to keep track of the slots that need to be cleared and updated it uses a weak map, to collect the stack amounts.

This will require an update for WolfyUtils too to work properly, as currently WU executes all the Item Input Buttons instead of just the affected ones.
@WolfyScript WolfyScript self-assigned this Jun 20, 2023
@WolfyScript WolfyScript added the bug Something isn't working label Jun 20, 2023
@WolfyScript WolfyScript merged commit 354d3b3 into master Jun 20, 2023
1 check passed
@WolfyScript WolfyScript deleted the fix/item_input_buttons_deleting_stacks_in_gui branch July 7, 2023 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant