This makes sure that the chestplate stack's "ghost" enchantment, that enables chestplate glint, isn't added if the chestplate is already enchanted (or if the "ghost" enchantment has already been applied).
Potentially not the best way to correct this bug, but I've tested it in 1.18.2 and can confirm that it works. Mending is only applied to the chestplate stack once, or not at all if the chestplate already has enchantments. Trying to interact with the elytra/chestplate will no longer kick/crash the player.
This makes sure that the chestplate stack's "ghost" enchantment, that enables chestplate glint, isn't added if the chestplate is already enchanted (or if the "ghost" enchantment has already been applied).
Potentially not the best way to correct this bug, but I've tested it in 1.18.2 and can confirm that it works. Mending is only applied to the chestplate stack once, or not at all if the chestplate already has enchantments. Trying to interact with the elytra/chestplate will no longer kick/crash the player.
Fixes #11