Seems like my command wont work, can anyone help me? i spent more than 30 minutes on this 1 command and still wont work. i put the command in the command block and it lights up, even if there is only 1 player
Here's the command; what am Idoing wrong?
/testfor @e[team=Red,c=2]
Best Answer
c=2
in 1.12 andlimit=2
in 1.13 is a restriction to at most that many entities. So if there are 3 players, it would just select 2. But if there is only 1, it would find that one player.To put the number of players on a team into a scoreboard called "playerCount", execute this command:
You don't even need a
run
and chained command, sinceexecute if
without a chained command just gives back the number of matched entities.dummyPlayer
is in this command, who would have thought, a dummy player. You can then run commands under the condition that it's higher than or equal to 2 like this: