So currently, in my KitGUI plugin which I have right now, I have this line of code: $p->getInventory()->addItem(Item::get(267, 0, 1)->setCustomName("§aWitch Blade")); The problem is, I don't know how to add enchantments to these items, so if anyone could help..? Thanks alot in advance <3 (no homo) ~ ethaniccc
PHP: $i = Item::get(ItemIds::IRON_SWORD); $i->setCustomName("§aWitch Blade"); $e = Enchantment::getEnchantment(Enchantment::EFFICIENCY); $i->addEnchantment(new EnchantmentInstance($e,1)); $p->getInventory()->addItem($i);