execute unless items entity @s weapon.mainhand *[custom_data~{ring:1}] run return run function ws:misc/quest/enchanter/cantdisenchant
execute unless items entity @s weapon.mainhand *[custom_data~{enchanted:1b}] run return run function ws:misc/quest/enchanter/notenchanted
item modify entity @s weapon.mainhand ws:enchanter/disenchant
tellraw @s {"text": "> ", "extra": [{"translate": "quest.enchanter.disenchanted","color":"green"}]}
execute at @s run playsound minecraft:block.enchantment_table.use player @a ~ ~ ~
execute at @e[tag=quest.enchanter,type=interaction] run stopsound @a[distance=..16] * minecraft:entity.villager.ambient
execute at @e[tag=quest.enchanter,type=interaction] run playsound minecraft:entity.villager.yes neutral @a
scoreboard players set @e[type=interaction,tag=quest.enchanter] enchanter.cd 1