On Entity Attack (Event) — Skript

Addon: Skript · Category: Event

Syntax

[on] (%entitytypes%|entity) attack [on %entitytypes%]

Description

Called when one entity attacks another. The attacking entity can be referred to as 'attacker' and the entity being attacked as 'victim'. Optionally filter by the attacker's entity type and/or the victim's entity type.

Event Values

  • event-attacker
  • event-entity
  • event-instance
  • event-player
  • event-victim

Examples

on entity attack:
on player attack:
on zombie attack on villager:
on entity attack on player:

View source