hello, I know how to charm an item, in mpon code I have to put '$ players-> getInventory () -> setChestplate (Item :: get (Item :: DIAMOND_CHESTPLATE))', here I am, I would like to give an item and the enchant directly, how to do?
You can add an enchantment using this example. If you want to add the enchantment in the Item::get() method, the last parameter needs to be NBT data. This may be helpful for that.