I'm trying to set up my Minecraft server so I can have minigames and a survival mode and I'm having trouble setting up so when players jump from the spawn (Which is high in the air) they get teleported back into the spawn. Is this possible?
1 Answer
You could set up a repeating command block with:
/tp @a[x=<X>,y=<Y>,z=<Z>,rm=<R>] <X> <Y> <Z>
Replace <X>
, <Y>
, and <Z>
with the corrosponding coordinates of spawn, and <R>
with the distance people can get from spawn before they are teleported back.
-
Then the next question would be: Would this stop players from using the portals created by the plugin Multiverse to move around or would it just keep teleporting the players back to the spawn? Commented Sep 22, 2016 at 8:25
-
1@FlatPancake I don't know how Multiverse works. If it does stop the portals from working, you could also set a
r
(radius max) so that only people between<R>
and<RM>
blocks are teleported. E.G:/tp @a[x=20,y=64,z=10,r=60,rm=50] 20 64 10
– SirBenetCommented Sep 22, 2016 at 10:40 -
1.13 syntax:
/tp @a[x=<X>,y=<Y>,z=<Z>,distance=<R>..] <X> <Y> <Z>
– ppperyCommented Dec 15, 2020 at 21:22