TransWikia.com

Is There a Way to tp a player back to Spawn After Falling into Void?

Arqade Asked by cubelords on March 24, 2021

I am making a mini-game for my server and would like the lobby to be a skyisland over the void, my question is, Is there a way to tp a player back to the skyisland if they fall in the void? I have a vanilla server and don’t want to use plugins or mods if possible.(maybe a command?)

3 Answers

For a world-wide area, can use /execute to change the coordinate origin to that of the player, and teleport them when they reach below y=0 (going downwards by 64 blocks):

/execute @a ~ ~ ~ /tp @a[c=1,y=-1,dy=-64] X Y Z

Or:

/execute @a ~ -1 ~ /tp @a[c=1,dy=-64] X Y Z

Correct answer by Skylinerw on March 24, 2021

/execute @a ~ -1 ~ /tp @a[c=1,dy=-64] X Y Z

@a: player

~ -1 ~: void coordinates

/tp @a[c=1,dy=-64]: teleports player

X Y Z: where to teleport player

Answered by user238708 on March 24, 2021

/execute at @a run tp @a[limit=1,y=-1,dy=-64] X Y Z for newer versions :]

Answered by user264791 on March 24, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP