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

Added a fix to check if the clicked inventory is the GUI and not player's own inventory #20

Merged
merged 3 commits into from
Mar 12, 2023

Conversation

MCreeper12731
Copy link
Contributor

@SamJakob
Copy link
Owner

Hi, Thanks for your PR!
I just noticed that I use event.getInventory instead of event.getClickedInventory on lines 28 - are you able to see if removing your new check and swapping getInventory with getClickedInventory work?

@MCreeper12731
Copy link
Contributor Author

Changed according to the instructions. There needs to be an additional check if clicked inventory is not null (occurs when the player clicks outside of the inventory UI)

@SamJakob
Copy link
Owner

All good, thanks! Did you get a chance to test this?

@MCreeper12731
Copy link
Contributor Author

Yes, tested, and it now works only if you click in the GUI. I can send a video if you need proof

@SamJakob
Copy link
Owner

Nope that's good enough for me! Thank you :)

@SamJakob SamJakob merged commit 9b244e8 into SamJakob:master Mar 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants