equip_hooks: type: world debug: false data: 40: HELMET 39: CHESTPLATE 38: LEGGINGS 37: BOOTS events: on block dispenses item: - define item - define loc ]> - define players <[loc].find_players_within[2].filter[location.distance[].is_less_than_or_equal_to[2.4]]> - if <[players].any>: - definemap context: source: DISPENSER entity: <[players].lowest[location.distance[]]> status: equip item: <[item]> - customevent id:equipment_change context:<[context]> # -------------------------------------------------- # # context.source - Source in which triggered the event. (RIGHT_CLICK, INVENTORY_CLICK, DISPENSER) # context.entity - The entity that had their equipment changed. # context.status - The type of equipping being done. Equip/Unequip/Swap # context.item - The item being equipped or unequipped # context.swapped - The item being swapped out during a swap status. # -------------------------------------------------- # on custom event id:equipment_change: - if : - define S "<&e><&7> equipped." - define S "<&e><&7> unequipped." if: - narrate <[S]> format:chat_format_debug targets: