Adding Enchantment in Code
TimLampen opened this issue ยท 2 comments
I was wondering if there was a way to let the coder to add the custom enchant to an item in the code instead of needing the player to enchant it. What I mean is that the coder can listen to PlayerInteractEvent or something then when he wants to he can do player.getItemInHand().addEnchantment(CustomEnchantment.SOMETHING, 1);
Thanks,
Tim
You could also just add the lore necessary for the plugin to recognize it as a custom enchant
For example:
player.getItemInHand().getItemMeta().getLore().add("\u00A77Lifesteal I");