-
Notifications
You must be signed in to change notification settings - Fork 23
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
Plugin does not check if the clicked inventory is the actual GUI #19
Comments
Oh I see what you mean. I recall this issue and must have just forgotten to implement a fix for this. I can’t do anything on this for the next couple of weeks but after I might be able to take a look. Otherwise if you can submit a PR I’m happy to merge. |
Submitted a PR, I hope I did everything correctly, I'm still new to GitHub |
Thanks for your PR just had a look and noticed a potentially simpler way of doing it. Replied to #20 |
Closed with #20. |
There is a known issue in Spigot when checking the inventory's clicked slot number because of the slot numbering system (picture included)
I fixed this issue by adding an additional fix
if (event.getClickedInventory() == null || event.getClickedInventory().getType() == InventoryType.PLAYER) return;
which checks if the inventory that was clicked was actually the upper part of the UI, otherwise the listener also let's through clicks that were done in the player inventory and act as if they were done in the GUI. But adding this everytime is a bit tedious. Sorry if the explanation is a bit confusing, I can go over certain parts again if you don't understand the problem
The text was updated successfully, but these errors were encountered: