public function attack($damage, EntityDamageEvent $source) { parent::attack($damage, $source); if (!$source->isCancelled() and $source->getCause() == EntityDamageEvent::CAUSE_ENTITY_ATTACK) { $this->attackingTick = 20; } }