I tried to modify the repair amount of mending using the setRepairAmount method.
But as soon i use this method e.g. setRepairAmount(1) the PlayerItemMendEvent will be called more then 500 times (which results that the item is instantly repaired).
In Class A:
In Class B:
(Two event listeners to be sure if the event will be called multiple times or if the debug message will be outputed multiple times)