maybe item -> addEnchantment(EnchantmentInstance(Enchantment, $level: int)) Enchantment class EnchantmentInstance class
Take a look at examples that are already out there. I also commented a little tutorial in PM3 in this thread: https://forums.pmmp.io/threads/how-do-i-make-a-custom-enchant.10799/#post-79332 This could also help https://github.com/DaPigGuy/PiggyCustomEnchants/tree/pmmp-4.0.0/src/DaPigGuy/PiggyCustomEnchants