I am trying to create a game where different potion effects are applied to a player depending on what armor the player is wearing (all of the armor is leather, but named and dyed). I know all of the ins and outs of it (test for a player wearing the gear sends out a signal which applies an effect), but how do I apply the affect to that player wearing the gear. Using @p or @a to specify wont work with multiple people as it will specify everyone or anyone.


Use scoreboard to keep track of players wearing the gear.


/scoreboard objective set isTarget dummy


/scoreboard players set @a isTarget 0
/scoreboard players set @a isTarget 1 {Inventory:[{Slot:<Slot>,id:<Item>}]}
/effect @a[score_isTarget_min=1]

Slot is the slot that you wish to search. Head armor slot is 103 and going in decreasing order to foot 100. Id is the item you want to test for.

| improve this answer | |
  • @Furogun if this answer solved your problem, please click the check mark under the score of the answer to accept it. – ModDL Nov 26 '15 at 1:23

Not the answer you're looking for? Browse other questions tagged or ask your own question.