# Realm Firsts — Announce Macro
# Broadcasts a server-first achievement to all players
# $(player) = player name, $(achievement) = what they did

data modify storage evercraft:notify stage.c set value [{text:"✦✦✦ ",color:"gold"},{text:"REALM FIRST!",bold:true,color:"#FFD700"},{text:" ✦✦✦",color:"gold"}]
scoreboard players set #ndur ec.temp 50
execute as @a run function evercraft:util/notify/emit
$data modify storage evercraft:notify stage.c set value [{text:"$(player)",color:"white",bold:true},{text:" is the first to: ",color:"gray"},{text:"$(achievement)",color:"gold"}]
scoreboard players set #ndur ec.temp 40
execute as @a run function evercraft:util/notify/emit
execute as @a at @s if score @s ec.fx_snd matches 1.. run playsound minecraft:ui.toast.challenge_complete master @s ~ ~ ~ 0.8 1.0
