
$execute at @s[tag=sgrave.loot] if data storage sgrave:settings {looting:1} in $(dimension) positioned $(x) $(y) $(z) as @n[type=marker,tag=sgrave,tag=sgrave.marker,scores={sgrave=$(gid)}] at @s run function snapgrave:response/retrieve/run
$execute at @s[tag=sgrave.loot] if data storage sgrave:settings {looting:1} in $(dimension) positioned $(x) $(y) $(z) run tp @e[type=item,distance=..1.5] @s
$execute at @s[tag=sgrave.loot] if data storage sgrave:settings {looting:1} in $(dimension) positioned $(x) $(y) $(z) run tp @e[type=experience_orb,distance=..1.5] @s


$kill @e[tag=sgrave,scores={sgrave=$(gid)}]
$execute in $(dimension) run fill $(x) $(y) $(z) $(x) $(y) $(z) air replace light[level=5]

$tellraw @s [{text:"Deleted ",color:"red"},{text:"Grave #$(gid)",color:"gold"},{text:" Successfully.",color:"red"}]
execute at @s run playsound entity.item_frame.remove_item master @s ~ ~ ~ 0.2 1

tag @s remove sgrave.loot