hasConflictingEnchant is missing in Skript #4245
Labels
enhancement
Feature request, an issue about something that could be improved, or a PR improving something.
priority: lowest
"Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements).
Suggestion
Hello,
I do not seem to find this expression/condition in Skript at all, meaning I cannot check for mutually-exclusive enchantments on an item before adding a new vanilla enchantment to it
https://papermc.io/javadocs/paper/1.16/org/bukkit/inventory/meta/ItemMeta.html#hasConflictingEnchant(org.bukkit.enchantments.Enchantment)
hasConflictingEnchant
boolean hasConflictingEnchant(@NotNull
@NotNull Enchantment ench)
Checks if the specified enchantment conflicts with any enchantments in this ItemMeta.
Parameters:
ench - enchantment to test
Returns:
true if the enchantment conflicts, false otherwise
Why?
I would like to add Sharpness 6 and other unobtainable vanilla enchantments through anvil and I don't seem to find a better way than this:
However with such skript, I am able to add sharpness6 to a sword that already has Smite for example (because I cannot find a way to check for conflicting enchants this way without adding ALL checks manually into my skript)
In short, I would like to be able higher levels of enchanted books for my swords/armors yet keep the original vanilla mutually-exclusive enchantments rule of Minecraft
Other
No response
Agreement
The text was updated successfully, but these errors were encountered: