How to tag two Players in one /testfor command? [duplicate]
I'm searching how to tag two Players using one /testfor
command. I'm actually using this command which works for one person :
/testfor @a[name=!<pseudo>,r=15]
But it doesn't work for two Players. Is it possible?
Solution 1:
First, create a dummy scoreboard objective:
/scoreboard objectives add selectMe dummy
Then, add 2 players to the "selectMe":
/scoreboard players set @e[name=Name1] selectMe 1
/scoreboard players set @e[name=Name2] selectMe 1
Now you can enter your command:
/testfor @a[score_selectMe_min=1,r=15]
or you can use this for an opposite effect:
/testfor @a[score_selectMe=0,r=15]
Help gotten from here