Closed ghost closed 4 years ago
My players noticed that the mending enchantment was not being applied to Elytra.
Inspection of the FixListener class revealed that the mending enchantment is always blocked:
@EventHandler(priority = EventPriority.HIGHEST) public void onFix(PlayerItemMendEvent event) { if(event.getItem().getType() == Material.ELYTRA) { event.setRepairAmount(0); } }
I have added similar condition checking as is applied to anvil repairing (config permission and override permission).
I have also added canMendElytra as a seperate config option as I think some people may want to enable one type of repairing but not the other.
Finally, I refactored the config initialisation code slightly to gracefully update the user's config file if upgrading from a previous version.
Thanks for this update! Apologies for the delay in merging.
My players noticed that the mending enchantment was not being applied to Elytra.
Inspection of the FixListener class revealed that the mending enchantment is always blocked:
I have added similar condition checking as is applied to anvil repairing (config permission and override permission).
I have also added canMendElytra as a seperate config option as I think some people may want to enable one type of repairing but not the other.
Finally, I refactored the config initialisation code slightly to gracefully update the user's config file if upgrading from a previous version.