I'm looking to make a lobby for a hunger games map and I was wondering if there are any commands that will teleport all players in a certain area (the lobby) to a random area in the map after a small countdown.
Also can you add a enchantmenteto weapons that apply the wither effect?
Another way it could be done if you need to detect if there is a player near or not, You could place down a command block either with a clock or in repeating mode and use a command like so:
Make sure not to use a distance too high as you can be stuck in an infinite loop which the only way to fix such problem is by destroying the block. You might want to keep its coordinate just incase it happens, so you can use /setblock X Y Z minecraft:air
/execute if entity @e[type=minecraft:player,distance=..#] run tp @e[type=player] X Y Z
Where # is the distance from the command block in a sphere and X Y Z are the coordinates you want. If you want the coordinates to be relative to your command block, use ~x ~y ~z.
/execute if entity @e[type=minecraft:player,distance=..2] run tp @e[type=minecraft:player] ~10 ~ ~
If you need to specify a negative position relative to the position of the block, the axis would look like so: ~-10