## Run from animation.ender_prisoner.trader_alert
## @s = ldz:ender_charger, ldz:ender_chef, ldz:ender_gardener, ldz:ender_hydro

scoreboard objectives add ChargerMorph dummy
scoreboard players add @a ChargerMorph 0
scoreboard players set @a[hasitem={item=ldz:morph_charger}] ChargerMorph 1
execute as @s[type=ldz:ender_charger] run titleraw @a[scores={ChargerMorph=0},r=6] actionbar { "rawtext": [ { "translate": "actionbar.ender_charger.can_trade", "with":["\n"] } ] }

scoreboard objectives add ChefMorph dummy
scoreboard players add @a ChefMorph 0
scoreboard players set @a[hasitem={item=ldz:morph_chef}] ChefMorph 1
execute as @s[type=ldz:ender_chef] run titleraw @a[scores={ChefMorph=0},r=6] actionbar { "rawtext": [ { "translate": "actionbar.ender_chef.can_trade", "with":["\n"] } ] }

scoreboard objectives add GardenerMorph dummy
scoreboard players add @a GardenerMorph 0
scoreboard players set @a[hasitem={item=ldz:morph_gardener}] GardenerMorph 1
execute as @s[type=ldz:ender_gardener] run titleraw @a[scores={GardenerMorph=0},r=6] actionbar { "rawtext": [ { "translate": "actionbar.ender_gardener.can_trade", "with":["\n"] } ] }

scoreboard objectives add HydroMorph dummy
scoreboard players add @a HydroMorph 0
scoreboard players set @a[hasitem={item=ldz:morph_hydro}] HydroMorph 1
execute as @s[type=ldz:ender_hydro] run titleraw @a[scores={HydroMorph=0},r=6] actionbar { "rawtext": [ { "translate": "actionbar.ender_hydro.can_trade", "with":["\n"] } ] }