How to detect when a player is wearing a chest plate with a specific name?

Solution 1:

This solution will add a scoreboard tag to any players who have the named chestplate equipped and are currently holding any item named "Jetpack Controller".

This will require a command block chain. The first command block removes the tag from anyone who previously got tagged but no longer meet the conditions. The second command block tags the players who currently meet the conditions.

These command blocks have to remain loaded at all times. I recommend putting them in the spawn chunk. I also recommend stopping command block output to prevent chat spam for op players. To do this, use command:

/gamerule commandBlockOutput false

The first command block is Repeat Unconditional Always Active with command:

scoreboard players tag @a remove Equipped

The second command block is Chain Unconditional Always Active with command:

scoreboard players tag @a add Equipped {Inventory:[{Slot:102b,id:"minecraft:chainmail_chestplate",tag:{display:{Name:"Jetpack"}}}],SelectedItem:{tag:{display:{Name:"Jetpack Controller"}}}}

Now you can target those players for other commands using the target selector with a tag argument:

@a[tag=Equipped]

For fun, lets make them all talk about their jetpacks:

/execute @a[tag=Equipped] ~ ~ ~ say I have my jetpack on

Now you can use this tag in your jetpack system.

Note: The selected item portion of the command does not contain the id element so any item named "Jetpack Controller" will satisfy it. If you want it to be a specific item, you will have to add that data to the command.