
execute unless data storage sgrave:settings {deleting:1} run return run function snapgrave:dialog/delete/disabled

execute at @s if entity @s[tag=sgrave.deleting] run playsound block.note_block.bass master @s ~ ~ ~ 0.2 1
execute if entity @s[tag=sgrave.deleting] run return run tellraw @s {text:"Deletion in progress. Please wait.",color:"red"}

scoreboard players set @s sgrave.deleting 20

tag @s add sgrave.deleting


execute store result storage sgrave:temp pid int 1 run scoreboard players get @s playerID
execute store result storage sgrave:temp del_num int 1 run scoreboard players get @s sgrave.delete

function snapgrave:dialog/delete/get_data with storage sgrave:temp

#function snapgrave:dialog/delete/forceload with storage sgrave:delete

function snapgrave:dialog/delete/storage with storage sgrave:temp

data remove storage sgrave:temp pid
data remove storage sgrave:temp gid
data remove storage sgrave:temp del_num
data remove storage sgrave:temp x
data remove storage sgrave:temp y
data remove storage sgrave:temp z
data remove storage sgrave:temp dimension


data modify storage sgrave:settings deleting set from storage sgrave:temp settings.deleting
data remove storage sgrave:temp settings

scoreboard players reset @s sgrave.delete