attack() public method

public attack ( $damage, EntityDamageEvent $source )
$source pocketmine\event\entity\EntityDamageEvent
Esempio n. 1
0
 public function attack($damage, EntityDamageEvent $source)
 {
     parent::attack($damage, $source);
     if (!$source->isCancelled() and $source->getCause() == EntityDamageEvent::CAUSE_ENTITY_ATTACK) {
         $this->attackingTick = 20;
     }
 }