Armour Events Breaking Other Plugins
What happened?
Something with the armour equip/unequip events in CustomCrafting seems to be affecting how other plugins, which listen for this event, work. Info on a specific instance of this issue here: https://github.com/GC-spigot/AdvancedEnchantments/issues/3241
How can the bug be reproduced?
Have a plugin that listens for armour equip/unequip. Equip the armour by drag+dropping into armour slot.
Expected Behaviour?
CustomCrafting doesn't conflict with other plugin, armour equip event works as expected.
Plugin version
CustomCrafting 4.16.6.4, WolfyUtilities 4.16.10.1
Server software
Spigot 1.18.2
Relevant log output
No response
Submit issue
- [X] read the Wiki and especially the FaQ, and made sure there is no fix to your issue,
- [X] searched for and ensured there isn't already an open issue regarding this,
- [X] are running the latest version of your server software (Spigot, Paper, etc.), and plugins (WolfyUtilities, CustomCrafting).
I had a look into it, and it is happening because the Equip Event causes the cursor and current stack to swap. That is because the event updates the inventory. I might be able to get it to work by simply adding AdvancedEnchantments to the WU soft depends. There is no way for me to test it without access to the plugin, but I'll add it and hope it fixes it.
You can try this out directly by editing the plugin.yml in the wolfyutils-spigot.jar and adding AdvancedEnchantments to the softdepend. (Simply open it up via winrar/7zip)
In case you use paper 1.19+ you need to add it to the paper-plugin.yml under load-after.
Unfortunately, it's still happening after trying that
Hmm, maybe I mixed things up, and you need to add it to the loadbefore list in the plugin.yml.
All we need is that the events of AdvancedEnchantments are called before WolfyUtils Equip events.
Still no luck :(