/tp
In this tutorial, I will be showing you how to use the /tp command along with showing some example commands.
/tp [target player] <destination player> OR /tp [target player] <x> <y> <z> [<yaw> <pitch>]
The /tp command is one of the most useful commands out there and has two different versions. One teleports one entity to another for example:
/tp @e[type=cow] @e[type=chicken,limit=1]
The first argument is the one who will be teleporting and the second it the destination mob. The destination much only be one entity so make sure you use limit=1. So this will teleport all cows to a chicken. If you want to teleport yourself you can just put in the destination player without the target player and it assumes the target it you.
/tp [target player] <destination player> OR /tp [target player] <x> <y> <z> [<yaw> <pitch>]
The /tp command is one of the most useful commands out there and has two different versions. One teleports one entity to another for example:
/tp @e[type=cow] @e[type=chicken,limit=1]
The first argument is the one who will be teleporting and the second it the destination mob. The destination much only be one entity so make sure you use limit=1. So this will teleport all cows to a chicken. If you want to teleport yourself you can just put in the destination player without the target player and it assumes the target it you.
/tp @e[type=chicken,limit=1]
This will teleport me to the nearest chicken coordinates. It also matches my head rotation but the chicken moved in the picture.
The second version of this command you choose your target entity but instead of a destination entity you put in coordinates (X,Y,X) and if you want to you can also put in the head rotation after the coordinates (Yaw,Pitch).
For example:
/tp @p ~ ~5 ~
Will teleport the nearest player (Which if done in chat will be you) 5 blocks up.
/tp @e[type=pig] 235 66 875
Will teleport all pigs in the world to the coordinates above.
/tp @s ~ ~ ~ 0 90
Will keep me in the same place and make me look straight down.
This will teleport me to the nearest chicken coordinates. It also matches my head rotation but the chicken moved in the picture.
The second version of this command you choose your target entity but instead of a destination entity you put in coordinates (X,Y,X) and if you want to you can also put in the head rotation after the coordinates (Yaw,Pitch).
For example:
/tp @p ~ ~5 ~
Will teleport the nearest player (Which if done in chat will be you) 5 blocks up.
/tp @e[type=pig] 235 66 875
Will teleport all pigs in the world to the coordinates above.
/tp @s ~ ~ ~ 0 90
Will keep me in the same place and make me look straight down.
For head rotation, the first value is LEFT/RIGHT and the second value is UP/DOWN.