I have a plugin I'm working on and I have a method to add certain enchants by tapping an enchant table, but I've heard there is a method where I can add enchants with more ease, but I'm not sure if I know the method. I've heard that I can add enchants to an item in my inventory but I'm not sure if I know this method. Yes I am using PMMP if you were wondering. My current code: Code: $lapis = Item::get(351, 4, 3); if ($event->getPlayer()->getInventory()->getItemInHand()->hasEnchantments() === false) { if ($event->getBlock()->getId() === 116) { if ($event->getPlayer()->getInventory()->contains($lapis)) { if ($event->getPlayer()->getInventory()->getItemInHand()->getId() == 276) { $config = $this->getConfig()->get("Weapon-Enchants"); $key = array_rand($config); $leet = $config[$key]; $item = Item::get(Item::DIAMOND_SWORD, 0, 1); $level = mt_rand(1, 5); $item->addEnchantment(Enchantment::getEnchantment($leet)->setLevel($level)); $event->getPlayer()->getInventory()->removeItem($lapis); //$event->getPlayer()->getInventory()->removeItem($event->getPlayer()->getInventory()->getItemInHand()); $event->getPlayer()->getInventory()->setItemInHand($item); $event->getPlayer()->sendTip("Recieved enchantment " . $leet . " lvl " . $level);