tag @s add recall
#execute if entity @s[nbt={SpawnDimension:"minecraft:overworld"}] at @s in minecraft:overworld run summon marker ~ ~ ~ {Tags:[recallmarker]}
#execute if entity @s[nbt={SpawnDimension:"minecraft:the_nether"}] at @s in minecraft:the_nether summon marker ~ ~ ~ {Tags:[recallmarker]}
#execute if entity @s[nbt={SpawnDimension:"minecraft:the_end"}] at @s in minecraft:the_nether summon marker ~ ~ ~ {Tags:[recallmarker]}
#execute in overworld run summon marker ~ ~ ~ {Tags:[recallmarker]}
summon marker ~ ~ ~ {Tags:[recallmarker]}
execute as @e[type=marker,tag=recallmarker,sort=nearest,limit=1] run function survivalplus:tools/pot/recalltp
advancement revoke @s only survivalplus:tools/pot/recall