Skip to content

Damage Effect

Xemor edited this page Apr 5, 2023 · 1 revision

Damage Effect

This is a very regularly used effect used for dealing damage. It supports modes SELF and OTHER. It takes in three parameters, damage, shouldTriggerEvents and damageCause. shouldTriggerEvents makes it bypass armour and prevents it from causing recursion (if you deal damage within an event that listens for you dealing damage, you will get a loop. This parameter is useful for preventing that recursion, other methods include adding a cooldown).

damage:
  type: DAMAGE
  mode: OTHER
  damage: 5
  shouldTriggerEvents: true
  damageCause: ENTITY_ATTACK

As always, you do not need to use every parameter and there are sensible defaults if you do not specify one.

Clone this wiki locally