-
-
Notifications
You must be signed in to change notification settings - Fork 373
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
ItemUtils#changeItemMeta, #setItem #7217
base: dev/feature
Are you sure you want to change the base?
ItemUtils#changeItemMeta, #setItem #7217
Conversation
# Conflicts: # src/main/java/ch/njol/skript/bukkitutil/ItemUtils.java
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.
Looks good. It might be nice to have a changeItemMeta
method that lets you work with specific ItemMeta implementations. See https://jd.papermc.io/paper/1.19/org/bukkit/inventory/ItemStack.html#editMeta(java.lang.Class,java.util.function.Consumer)
I thought you had said because my method is almost the exact same as Paper's |
I believe the idea behind his suggestion is to accept a meta class in the parameter similar to how paper does |
Description
This PR is to help with shorthand ItemStack changes.
Example: (Before)
(After)
Obviously this will more than likely be
up for debate
but here's hoping.Target Minecraft Versions: any
Requirements: none
Related Issues: none