diff --git a/src/entity/Living.php b/src/entity/Living.php index de433cd12..e615e4148 100644 --- a/src/entity/Living.php +++ b/src/entity/Living.php @@ -504,7 +504,7 @@ abstract class Living extends Entity{ } public function attack(EntityDamageEvent $source) : void{ - if($this->noDamageTicks > 0){ + if($this->noDamageTicks > 0 && $source->getCause() !== EntityDamageEvent::CAUSE_SUICIDE){ $source->cancel(); }