ItemEvents.modification(event => {
    event.modify("minecraft:elytra", item => {
      item.setMaxDamage(24);
    });
  });

ItemEvents.modification(event => {
    // Chainmail Helmet: between 55 (Leather) and 165 (Iron)
    event.modify("minecraft:chainmail_helmet", item => {
      item.setMaxDamage(110); // Midpoint
    });
  
    // Chainmail Chestplate: between 80 (Leather) and 240 (Iron)
    event.modify("minecraft:chainmail_chestplate", item => {
      item.setMaxDamage(160); // Midpoint
    });
  
    // Chainmail Leggings: between 75 (Leather) and 225 (Iron)
    event.modify("minecraft:chainmail_leggings", item => {
      item.setMaxDamage(150); // Midpoint
    });
  
    // Chainmail Boots: between 65 (Leather) and 195 (Iron)
    event.modify("minecraft:chainmail_boots", item => {
      item.setMaxDamage(130); // Midpoint
    });
  });