execute if score .host_mode settings matches 1 unless entity @s[tag=op] run return run tellraw @s {"text":"\nYou do not have permission to use the Map Editor in Host Mode! To toggle Host Mode an operator must type `/function pctf:host_mode/toggle`","color":"red"}
execute if score .game_in_progress lobby matches 1 run return run tellraw @s {"text":"You cannot edit a map while there is a game in progress!","color":"red"}
execute if score .time_till_tp countdown matches 1.. run return run tellraw @s {"text":"You cannot edit a map when a game is about to start!","color":"red"}

execute store result storage pctf:map_maker input.edit_id int 1 run scoreboard players get .selected_map lobby
function pctf:mode/z_map_maker/edit/tp with storage pctf:map_maker input

tag @s add dev