This PR fixes the issues as mentioned in #9 and #18.
The $i->setCustomName($values["name"]) was being called after the CustomEnchants were applied leading to the item being CustomEnchanted but with a custom name as PiggyCustomEnchants lists the enchants using the setCustomName().
So adding the same before the application of Enchants fixes the issue as shown in this PR.
This PR fixes the issues as mentioned in #9 and #18.
The
$i->setCustomName($values["name"])
was being called after the CustomEnchants were applied leading to the item being CustomEnchanted but with a custom name as PiggyCustomEnchants lists the enchants using thesetCustomName()
.So adding the same before the application of Enchants fixes the issue as shown in this PR.