$scoreboard players set @s map_editor_id $(edit_id)
execute unless entity @s[tag=admin] if score @s map_editor_id matches 1..9 run return run tellraw @s {"text":"You cannot edit this map! It is a default map","color":"red"}
gamemode creative @s
tag @s add dev
$function pctf:mode/z_map_maker/go_to_map {map_id: "$(edit_id)"}
$tag @e[tag=map_lobby,tag=!not_active,scores={map_id=$(edit_id)}] add not_active
function pctf:mode/z_map_maker/edit/items
tag @s add edit_mode

$tellraw @s {"text":"You are editing Map $(edit_id)","bold":true,"color":"light_purple"}