# Coordinate of player standing on a certain block

I'm building a parkour map where if a player falls on a red wool, that particular player needs to be teleported to the start of that level. The problem is that many players can be playing at the same time, so I cant do `@p` which will teleport the nearest player. Is there any way to get the coordinates of the player who falls on the red wool so that I can use:

``````/tp @p[x,y,z,0] X Y Z
``````

Or is there any other way?

• A player who falls onto a specific block of red wool, or just any red wool? Commented May 9, 2015 at 20:28

Run a execute detect on players standing on red wool in a certain area:

``````/execute @a[x=<woolX>,y=<woolY>,z=<woolZ>,r=<Range>] ~ ~ ~ detect ~ ~-1 ~ minecraft:wool 14 tp @p <X> <Y> <Z>
``````
• You should use `@a[c=1]` as the nested selector instead of `@p`. Only `@a` can target dead players, so if a player were to die on top of red wool (such as from fall damage being a parkour map), `@p` will teleport the nearest-living player to the specified location. If all players playing are closer to the dead player than the teleport location, it effectively locks all players at the start until the dead player respawns. Commented Apr 18, 2017 at 1:49

Simple : `/execute @a ~ ~ ~ detect ~ ~-1 ~ wool 14 tp @p <x> <y> <z>`

Those x, y, z coordinates are your start coordinate of each level that you have mentioned.

Edit: Only thing that came to my mind is:

``````/spawnpoint @p
``````

and

``````/kill @p
``````
• You should use `@a[c=1]` as the nested selector instead of `@p`. Only `@a` can target dead players, so if a player were to die on top of red wool (such as from fall damage being a parkour map), `@p` will teleport the nearest-living player to the specified location. If all players playing are closer to the dead player than the teleport location, it effectively locks all players at the start until the dead player respawns. Commented Apr 18, 2017 at 1:49

Set up a command block on a Repeat, Always Active command block then put:

``````/execute @a ~ ~ ~ detect ~ ~-1 ~ minecraft:wool 14 /tp @p x y z
``````
• You should use `@a[c=1]` as the nested selector instead of `@p`. Only `@a` can target dead players, so if a player were to die on top of red wool (such as from fall damage being a parkour map), `@p` will teleport the nearest-living player to the specified location. If all players playing are closer to the dead player than the teleport location, it effectively locks all players at the start until the dead player respawns. Commented Apr 18, 2017 at 1:49