DaPigGuy / PiggyCrates

A crate plugin for PocketMine-MP supporting unlimited crate types
https://piggydocs.aericio.net/PiggyCrates.html
Apache License 2.0
31 stars 40 forks source link

Fix for #9 and #18 #20

Closed Ifera closed 6 years ago

Ifera commented 6 years ago

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.