PocketMine-MP  1.4 - API 1.10.0
 All Classes Namespaces Functions Variables Pages
EntityRegainHealthEvent.php
1 <?php
2 
22 namespace pocketmine\event\entity;
23 
26 
28  public static $handlerList = null;
29  public static $eventPool = [];
30  public static $nextEvent = 0;
31 
32  const CAUSE_REGEN = 0;
33  const CAUSE_EATING = 1;
34  const CAUSE_MAGIC = 2;
35  const CAUSE_CUSTOM = 3;
36 
37  private $amount;
38  private $reason;
39 
40 
46  public function __construct(Entity $entity, $amount, $regainReason){
47  $this->entity = $entity;
48  $this->amount = $amount;
49  $this->reason = (int) $regainReason;
50  }
51 
55  public function getAmount(){
56  return $this->amount;
57  }
58 
62  public function setAmount($amount){
63  $this->amount = $amount;
64  }
65 
66  public function getRegainReason(){
67  return $this->reason;
68  }
69 
70 }
__construct(Entity $entity, $amount, $regainReason)