Is it possible to toggle Resource Pack elements for players?

Context: I want the appearance of the armour bar to change with the armour material equipped

Alternatives:

  • Using a display entity with interp for this element in Paper/Spigot and modifying it, while hiding the HUD element entirely with the resource pack
  • Using the XP bar, etc. (other components) for this as they won't be in use
  • Switching the resource pack entirely for the player ❌ Bad solution

Requirements:

  • Without armour, no armour bar is shown ✅ Vanilla
  • With iron chestplate, the armour bar is blue
  • With netherite chestplate, the armour bar is orange with a different number of icons (same "progress"/"size")

Using:

  • Paper/Spigot (so a solution relying on these is ideal - but a generic "method" is even better!)
Continue to help post