How can I teleport every entity below Y=0 to Y=255 in Minecraft? I'm making Skyblock, but I want falling out of the void to teleport you to the height limit.

1 Answer 1


This is taken from this post (archive).

You can store all the player's y-level in a scoreboard:

/scorebaord objectives add dummy y

Then set the scoreboard values to the players' y-level (put this in a repeating command block):

execute as @a store result score @s y run data get entity @s Pos[1]

Finally, put this in another repeating command block to teleport the players to the height limit:

execute as @a[scores={y=..0}] at @s run tp @s ~ 255 ~

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .