public function attack($damage, EntityDamageEvent $source) { if ($source->getCause() === EntityDamageEvent::CAUSE_VOID) { parent::attack($damage, $source); } }