0

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?

1
  • A player who falls onto a specific block of red wool, or just any red wool?
    – SirBenet
    May 9 '15 at 20:28
1

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>
1
  • 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.
    – Skylinerw
    Apr 18 '17 at 1:49
0

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
1
  • 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.
    – Skylinerw
    Apr 18 '17 at 1:49
0

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
1
  • 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.
    – Skylinerw
    Apr 18 '17 at 1:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.