execute if entity @s[team=!red] if entity @n[type=marker,tag=join_red_location,distance=..2] run function pctf:logic/lobby/join/red
execute if entity @s[team=!blue] if entity @n[type=marker,tag=join_blue_location,distance=..2] run function pctf:logic/lobby/join/blue
execute if entity @s[team=!lobby] if entity @n[type=marker,tag=main_lobby,distance=..2] run function pctf:logic/lobby/join/none