public function heal($amount, EntityRegainHealthEvent $source) { parent::heal($amount, $source); if ($source->isCancelled()) { return; } $this->attackTime = 0; }