Damage Cause (Condition) — Skript
Addon: Skript · Category: Condition · Since: 2.0
Syntax
[the] damage (was|is|has)(|n('|o)t) [been] (caused|done|made) by %damagecause%Description
Tests what kind of damage caused a <a href='#damage'>damage event</a>. Refer to the <a href='#damagecause'>Damage Cause</a> type for a list of all possible causes.
Examples
# make players use their potions of fire resistance whenever they take any kind of fire damage
on damage:
damage was caused by lava, fire or burning
victim is a player
victim has a potion of fire resistance
cancel event
apply fire resistance to the victim for 30 seconds
remove 1 potion of fire resistance from the victim
# prevent mobs from dropping items under certain circumstances
on death:
entity is not a player
damage wasn't caused by a block explosion, an attack, a projectile, a potion, fire, burning, thorns or poison
clear drops