hasConflictingEnchant is missing in Skript
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
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:
on anvil prepare:
if slot 0 of event-inventory is an enchanted book:
set {_bookslot} to 0
set {_itemslot} to slot 1 of event-inventory
else if slot 1 of event-inventory is an enchanted book:
set {_bookslot} to 1
set {_itemslot} to slot 0 of event-inventory
else:
stop
if stored enchants of slot {_bookslot} of event-inventory contains sharpness 6:
set {_i} to {_itemslot}
enchant {_i} with sharpness 6
set event-slot to {_i}
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
- [X] I have read the guidelines above and confirm I am following them with this suggestion.
I don't see how this is an issue... if you want a feature, then you need to give more details. If you need help, join the skUnity Discord server and ask there.
Then there wouldn't be suggestion form. Let's begin with skript-reflect - if vanilla skript or addons don't provide something BUT bukkit api does, then skript-reflect is your best friend and that's it. It would be a nice touch, but not many people would even know and actually use it. In short; completely pointless.
Good suggestion 👍