playsound custom.spell.trigger ambient @a ~ ~ ~

execute if entity @s[tag=air] run function items:wand/arch/air/0_sort
execute if entity @s[tag=fire] run function items:wand/arch/fire/0_sort
execute if entity @s[tag=water] run function items:wand/arch/water/0_sort
execute if entity @s[tag=dark] run function items:wand/arch/dark/0_sort
execute if entity @s[tag=earth] run function items:wand/arch/earth/0_sort
execute if entity @s[tag=thunder] run function items:wand/arch/thunder/0_sort

kill @s
