How to teleport a player into the air using "~ ~ ~"?

I am looking to teleport a person using a command like

/tp @p ~ ~ ~

I would like to teleport a player one block into the air.

Is this the command? If not, what is it? How do I use it?


The following will teleport a player one block into the air:

/tp @p ~0 ~1 ~0

Here is the breakdown:

  • /tp - The command to teleport a player
  • @p - The player closest to you. Also, if you are playing with Command Blocks, then this will teleport the player standing closest to the command block.

The next three are the X, Y, and Z coordinates. The tilde means "relative to the current position".

  • ~0 - Zero blocks in the X (East/West) direction
  • ~1 - Positive one blocks in the Y (Up/Down) direction
  • ~0 - Zero blocks in the Z (North/South) direction

A tilde by itself is shorthand for ~0. For example, the following will teleport the player down (in the negative Y direction) five blocks.

/tp @p ~ ~-5 ~