Commands/testfor

Counts entities (players, mobs, items, etc.) matching specified conditions.
==Syntax==
: testfor <victim: target>
==Arguments==
: Specifies the entities to test.
: 
==Result==
== Output ==
==Examples==
* To test if Alice is online: testfor Alice
* To count the number of players in Survival mode within a 3-block radius of (0,64,0): testfor @a[x=0,y=64,z=0,r=3,m=0]
* To count the number of zombies within a 20-block radius of (0,64,0): testfor @e[x=0,y=64,z=0,r=20,type=zombie]
== History ==
de:Befehl/testfor
es:Comandos/testfor
ja:コマンド/testfor
pt:Comandos/testfor
zh:命令/testfor