I've noticed when adding a enchant to an item, if that item has a lore it disappears and the lore can no longer be added now i don't know if i am doing it wrong but is anyone else having this issue? Spoiler: The Code PHP: $new = $this->getExp($i) - $cost; $p->getInventory()->removeItem($i); $i->getNamedTag()->setInt('EXP',$new); $lore = ["§6EXP:§e ".number_format($new)]; $i->setLore($lore); $i->addEnchantment(new EnchantmentInstance(Enchantment::getEnchantment(Enchantment::EFFICIENCY),1)); $p->getInventory()->addItem($i);
PHP: $p->getInventory()->removeItem($i); $i->getNamedTag()->setInt('EXP',$new); $lore = ["§6EXP:§e ".number_format($new)]; $i->setLore($lore); $i->addEnchantment(new EnchantmentInstance(Enchantment::getEnchantment(Enchantment::EFFICIENCY),1)); $p->getInventory()->addItem($i);