JJElytraSwap
A client-side mod that automatically swaps between your best chestplate and an elytra when pressing spacebar in mid-air.

Automatic Elytra and Chestplate Swapping
JJElytraSwap is a Java Edition mod by JavaJumper that automates switching between your chestplate and your elytra. You do not need to open your inventory to change gear before gliding. Instead, the mod manages the equipment transition in the background while you play.
Pressing the spacebar while in the air automatically equips your elytra and removes your chestplate. You can then glide just as you normally would in vanilla Minecraft. Once your character touches the ground again, the mod puts your chestplate back into the armor slot.
Chestplate Scoring and Selection
From version 2.0 onward, an armor selection system evaluates your inventory to re-equip the highest-scoring chestplate upon landing. The total score is based on base protection, where each full protection point adds 2 armor points to the calculation. Material toughness also adds 1 armor point per toughness value, meaning a Netherite Chestplate gets 3 points, a Diamond Chestplate gets 2 points, and other materials receive 0 points.
Enchantments and custom names further increase a chestplate's priority score. The Protection enchantment adds 2 armor points per level, while Unbreaking adds 0.06 armor points for each level. Additionally, an item with Mending gains 0.5 armor points, and having a custom name on the chestplate adds 0.25 armor points.
Multiplayer and Client-Side Usage
This mod runs purely on the client side and requires caution when used on multiplayer servers. Because automatic inventory swapping may violate certain server rules, using it online is done at your own risk. Players should review server guidelines or consult with server administrators before enabling JJElytraSwap in multiplayer.
Questions
How do I trigger the swap to the elytra?
Press the spacebar while your character is airborne to automatically equip the elytra.
When does my chestplate get equipped again?
The mod automatically puts your chestplate back on as soon as you land on the ground.
How does the mod decide which chestplate to equip if I have more than one?
In version 2.0 and later, it calculates a score based on protection points, material toughness, enchantments (Protection, Mending, Unbreaking), and whether the item has a custom name, then equips the one with the highest score.
Does JJElytraSwap need to be installed on the server?
No, it is a client-side only mod, though you should check with server admins before using it in multiplayer.
Related

Adds a dedicated Curios or Trinkets slot for the elytra so players can fly while wearing chest armor.

Adds craftable colorful wings worn in the Curios or Trinkets back slot that consume hunger while flying.

Overhauls elytra flight controls and camera movement with full pitch, yaw, and roll mechanics.

Allows players to take off with an elytra from the ground using a firework rocket without jumping.

A Create addon that adds a craftable mechanical wing glider with a wing-flap boost mechanic.

Lets players brake and slow down during elytra flight by pressing the sneak key, reducing landing damage.

Allows players to equip their elytra in the Baubles body slot and fixes several Baubles bugs.

A Create addon that adds rotation-powered flight anchors, an elytra-crafted Angel Ring, and upgraded elytra takeoff and boosting mechanics.