
scoreboard players reset @s sgrave.list

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

function snapgrave:dialog/get_glist with storage sgrave:temp

execute unless data storage sgrave:temp graves_list[] run dialog show @s {type:"minecraft:notice",title:"Graves",external_title:"",body:[{type:"minecraft:plain_message",contents:{text:"You have Claimed All Your Graves.",color:"green"}},{type:"minecraft:plain_message",contents:{text:"Well done!",color:"gold"}}],pause:0b,action:{label:"close"}}
execute if data storage sgrave:temp graves_list[] run function snapgrave:dialog/get_grave

function snapgrave:dialog/show with storage sgrave:temp

data remove storage sgrave:temp graves_list
data remove storage sgrave:temp grave
data remove storage sgrave:temp actions
data remove storage sgrave:temp x
data remove storage sgrave:temp y
data remove storage sgrave:temp z
data remove storage sgrave:temp pid
data remove storage sgrave:temp gid
data remove storage sgrave:temp dimension
data remove storage sgrave:temp del_num
scoreboard players reset @s sgrave.del_num
