I recommend setting up a command block as repeat, unconditional and always active and entering a tp
command.
The key to covering only a certain area is using the target selector arguments, particularly the volume dimension arguments. Something like
tp @a[x=<value>, dx=<value>, y=<value>, dy=<value>, z=<value>, dz=<value>] <location>
... where...
- The
@a
target selector targets all players
- The
<x>
,<y>
,<z>
and <dx>
,<dy>
,<dz>
selector arguments limit the @a
selection only to a certain volume
- The
<location>
is the x, y, and z coordinates of where you want the players teleported to
... will select all players, whose hitbox is at least partially contained in the volume defined by the start point [x, y, z]
and the difference [dx, dy, dz]
from the start point. Hence
@a[x=0, dx=10, y=0, dy=10, z=0, dz=10]
... will target all players in a cubic volume between the points [0, 0, 0]
and [10, 10, 10]
.
If you define only the difference, the selector will select everyone in the volume starting from the coordinates of the entity executing the command (can be your command block).
So, in other words, in your case something like this should work:
tp @a[x=999909, y=136, z=999955, dx=12, dy=0, dz=130] <target x> <target y> <target z>