-
Notifications
You must be signed in to change notification settings - Fork 16
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
Fixed some bugs and added QoL features #181
Fixed some bugs and added QoL features #181
Conversation
Fixed some bugs regarding removeable/stealable GUI items
I'll take a look into reviewing this soon, sorry for the delay |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution! Here are some of the things that I noticed. Please feel free to reply to any of my comments if you have any questions/thoughts 🙂
src/main/java/io/github/apickledwalrus/skriptgui/elements/sections/SecMakeGUI.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/apickledwalrus/skriptgui/gui/events/GUIEvents.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/apickledwalrus/skriptgui/elements/sections/SecSlotChange.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/apickledwalrus/skriptgui/gui/GUIEventHandler.java
Show resolved
Hide resolved
src/main/java/io/github/apickledwalrus/skriptgui/gui/events/GUIEvents.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/apickledwalrus/skriptgui/gui/events/GUIEvents.java
Show resolved
Hide resolved
src/main/java/io/github/apickledwalrus/skriptgui/gui/events/GUIEvents.java
Outdated
Show resolved
Hide resolved
… and the opposite Removed unwanted code
I have committed the updated code, fixing all the previous mistakes |
src/main/java/io/github/apickledwalrus/skriptgui/elements/sections/SecMakeGUI.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/apickledwalrus/skriptgui/gui/events/GUIEvents.java
Outdated
Show resolved
Hide resolved
…ions/SecMakeGUI.java Co-authored-by: Patrick Miller <[email protected]>
…IEvents.java Co-authored-by: Patrick Miller <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mainly just the one change that needs further testing. Other than that, this should be good to go. Thank you for your work!!
src/main/java/io/github/apickledwalrus/skriptgui/gui/events/GUIEvents.java
Show resolved
Hide resolved
src/main/java/io/github/apickledwalrus/skriptgui/gui/events/GUIEvents.java
Show resolved
Hide resolved
…IEvents.java Co-authored-by: Patrick Miller <[email protected]>
src/main/java/io/github/apickledwalrus/skriptgui/gui/events/GUIEvents.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. Thanks for your work!
Changes
Made stealable items moveable regardless whether they were in a section or no
Why: If someone specifically marked a slot as stealable, i see NO reason why this should still be cancelling the event. To move sectioned slots the slot itself has to be stealable, if the gui is stealable but the slot isn't then it won't let you move it
Made a new Slot Changed section, which is triggered when a specific slot was changed
Why: This makes it easier to detect changes. Before, it wasn't even possible to detect when you instantly move an item from your inventory into the GUI. Most of the time, cancelling the event won't do anything in a Slot Changed section. You might think this is useless but it has (for me at least) alot of usecases, such as custom anvil or custom crafting table
Some changes to the code
Why: Some parts were causing a warning because they weren't properly coded, such as
if List#size == 0
instead ofif List#isEmpty
For the most part, I added stuff to skript-gui. It won't affect others and would be useful in some situations. So I hope this PR get's accepted or added in some way