PocketMine-MP  1.4 - API 1.10.0
 All Classes Namespaces Functions Variables Pages
EntityDamageByEntityEvent.php
1 <?php
2 
22 namespace pocketmine\event\entity;
23 
25 
27  public static $eventPool = [];
28  public static $nextEvent = 0;
29 
31  private $damager;
33  private $knockBack;
34 
42  public function __construct(Entity $damager, Entity $entity, $cause, $damage, $knockBack = 0.4){
43  $this->damager = $damager;
44  $this->knockBack = $knockBack;
45  parent::__construct($entity, $cause, $damage);
46  }
47 
51  public function getDamager(){
52  return $this->damager;
53  }
57  public function getKnockBack(){
58  return $this->knockBack;
59  }
63  public function setKnockBack($knockBack){
64  $this->knockBack = $knockBack;
65  }
66 }
__construct(Entity $damager, Entity $entity, $cause, $damage, $knockBack=0.4)