In MCPE/Bedrock, the commands sort of appear as you type them, giving you options to choose from. I typed in /testfor @p[r=3, and then, these appeared:

  1. C
  2. Dx
  3. Dy
  4. L
  5. Lm
  6. M
  7. Name
  8. R
  9. Rm
  10. Rx
  11. Rxm
  12. Ry
  13. Rym
  14. Type
  15. X
  16. Y
  17. Z

What do all these different values mean? I know about Type and Name, so you don't need to list those when answering this question.

Also, slightly off-topic but I am looking to create a testfor command that activates a comparator when there is a player with a certain item in their hand. Is there one of these tags that would help me do this?


  • x/y/z - Change the starting point for area selections. They do nothing on their own, but change where r, rm, and dx/dy/dz start from.
  • r - The maximum radius around the starting point for entity selection. Only entities within the radius will be selected.
  • rm - The minimum radius. Only entities outside the minimum radius will be selected.
  • dx/dy/dz - Define a bounding box for entity selection. The box starts at the starting point, and extends dx/dy/dz + 1 blocks in the respective directions. If any of them are negative, it instead extends dx/dy/dz - 1 blocks in that direction. If you use any of them, the ones you leave out are assumed to be 0.
  • c - The maximum count of entities that will be selected. The closest entities are chosen first. If you make this negative, it will select the furthest entities instead.
  • l - The maximum XP level of target players.
  • lm - The minimum XP level.
  • m - The gamemode of target players.
  • rx/ry - The maximum rotation of the target entity around the X and Y axes.
  • rxm/rym - The minimum rotation.

I am looking to create a testfor command that activates a comparator when there is a player with a certain item in their hand.

I don't think this can be done in BE. It would require access to player data, or a command that can check whether a slot contains a certain item, and BE has neither.