Minecraft : Command block – Tp area

minecraft-commandsminecraft-java-edition

I've searched a long time and try out many possibilities but I never managed to get it worked.
I'd like to make a jump parkour map for minecraft and I need to make areas with command blocks to teleport a player to a fixed position.
The areas need to be extended on two axes (only x and z) to be a plane zone. By this way I can use it to make some barriers which will be able to get the player back to his spawn position if he fell down after a miss jump.

I tried on multiple minecraft versions : 1.7 1.8 1.9

I tried to use :
Simple tp area with 'radius' :
/tp @p[r=<value>] <x> <y> <z>
or /tp @p[dx=<>, dy=<>, dz=<>] <x> <y> <z>

Btw I always have this error: I can't find a way

the entity uuid provided is in an invalid format

Hope it there a solution 😉
Best regards,

Alpha

My researches :
http://minecraft.gamepedia.com/Command_Block
http://minecraft.gamepedia.com/Tutorials/Command_block
and a lot of more french websites..;

Best Answer

So two things. First, in your second example you have spaces in your target selector, which isn't allowed. Instead of /tp @p[dx=#, dy=#, dz=#] # # # you should have /tp @p[dx=#,dy=#,dz=#] # # #.

But this belies the bigger problem with that example in that in order to use dx, dy, and dz (which represent the lengths of the sides of a box), you need x, y, and z, which marks the corner of the box, so the command should be /tp @p[x=#,y=#,z=#,dx=#,dy=#,dz=#] # # #. (You technically don't need the x, y, and z, but that makes the command block be the corner, and your command blocks are generally to far away from the parts of the map you're interested in.)

You can also use the r selector variable with the x, y, and z selector variables. In your example with the r, the selection area is centred on the command block that's running it, not on the player that you're targeting. In that case, the command would be /tp @p[x=#,y=#,z=#,r=#] # # #.

Related Topic