Minecraft 1.8: Check if player is at a specific Y position
Can you tell me if it is possible to use the testfor
command to check if a player stands on a specific Y position?
I tried it with
/testfor @e[type=Player] {Pos:{Y:57d}}
, but it won't work.
The error was [Player] did not match the required data structure
Use @p[y=<y value>]
, replacing with the y coordinate you wish to search.
Additionally, you can define a cubic search area with @p[x=<x value>,y=<y value>,z=<z value>]
, replacing <x value>, <y value>, and <z value>
with their respective values.
Do not put spaces after the commas. For more information, visit:
http://minecraft.gamepedia.com/Tutorials/Command_Block http://minecraft.gamepedia.com/Commands