execute align xz run tp @s ~0.5 ~ ~0.5
execute at @s unless block ~ ~-1 ~ minecraft:bedrock run return run tellraw @s {"text":"You must be standing on bedrock!","color":"dark_red"}
$execute at @s run kill @e[type=marker,name=map_center$(map_id)]
$execute at @s run summon marker ~ ~ ~ {Tags:["map_center","new"],CustomName:{"color":"dark_aqua","text":"map_center$(map_id)"}}
$execute at @s run scoreboard players set @n[tag=new] map_id $(map_id)
tag @e[tag=new] remove new
$tellraw @s {"text":"Placed new map center for map $(map_id)","color":"dark_aqua"}
forceload add ~ ~