diff --git a/core/src/main/kotlin/com/willfp/libreforge/triggers/impl/TriggerTakeDamage.kt b/core/src/main/kotlin/com/willfp/libreforge/triggers/impl/TriggerTakeDamage.kt index fbb425be4..f3b6ffa86 100644 --- a/core/src/main/kotlin/com/willfp/libreforge/triggers/impl/TriggerTakeDamage.kt +++ b/core/src/main/kotlin/com/willfp/libreforge/triggers/impl/TriggerTakeDamage.kt @@ -13,6 +13,12 @@ object TriggerTakeDamage : Trigger("take_damage") { TriggerParameter.EVENT ) + private val ignoredCauses = setOf( + EntityDamageEvent.DamageCause.KILL, + EntityDamageEvent.DamageCause.VOID, + EntityDamageEvent.DamageCause.SUICIDE + ) + @EventHandler(ignoreCancelled = true) fun handle(event: EntityDamageEvent) { val victim = event.entity @@ -21,6 +27,10 @@ object TriggerTakeDamage : Trigger("take_damage") { return } + if (event.cause in ignoredCauses) { + return + } + this.dispatch( victim, TriggerData(