| Name | player item takes damage |
| Event Lines | player item takes damage
player <item> takes damage |
| Triggers | when the player damages an item. |
| Generated Examples | after player item takes damage:
after player cherry_chest_boat takes damage: |
| Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Contexts | <context.damage> returns the amount of damage the item has taken.
<context.original_damage> returns the original amount of damage the item would have taken, before any modifications such as the unbreaking enchantment (only on Paper).
<context.item> returns the item that has taken damage.
<context.slot> returns the slot of the item that has taken damage. This value is a bit of a hack and is not reliable.
|
| Determine | ElementTag(Number) to set the amount of damage the item will take. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Synonyms (Search Aid) | item durability changes |
| Group | Player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerItemTakesDamageScriptEvent.java#L20 |