crashtheparty / EnchantmentSolution

Enchantment plugin for Custom Enchantments.
15 stars 14 forks source link

Enchantments duplicate #95

Closed dfsek closed 4 years ago

dfsek commented 4 years ago

Describe the bug Enchantments on items repeatedly duplicate after updating.

Debug.yml https://pastebin.com/0SgVcGhr

To Reproduce Steps to reproduce the behavior:

  1. Enchant an item in 1.15.2 on version 2.3.0
  2. Upgrade to 1.16.1 with version 2.3.1
  3. Watch as all items suddenly get massive numbers of duplicated enchantments.

Expected behavior Enchantments do not duplicate

Screenshots image image

dfsek commented 4 years ago

/es fix does not fix the issue either

PadawanAmy commented 4 years ago

Same here

crashtheparty commented 4 years ago

Enchantment Solution used https://bukkit.org/threads/storing-hidden-data-in-itemstacks-using-colors-persistent-no-nms.319970/ for persistent data in item stacks (saving the enchantment names on the fly so they wouldn't duplicate ever) to maintain the item lore. I did not know until today that this feature will no longer work in 1.16, and thus requires a huge update on my part to solve the issue. Any help finding an alternative system is useful. I will be putting up a bug fix update soon, but /esfix is currently the issue. Also set "enchantment_check" to a very high integer, as this will also cause the duplication problem. Note that other things may be broken because of this as well, and it will be getting worked on.

dfsek commented 4 years ago

I have found the PersistentDataHolder API (Introduced in 1.14) to be very helpful in my plugins.

dfsek commented 4 years ago

though this would most likely mean dropping 1.13 support, but according to your statistics that's only 5 of your users, and they could continue to use legacy versions if they refuse to update.

crashtheparty commented 4 years ago

There will have to be some legacy support anyway, so that doesn't necessarily matter. I just looked into that system, and it seems like I could make it work, but it will definitely take some time.