PocketMine-MP  1.4 - API 1.10.0
 All Classes Namespaces Functions Variables Pages
FurnaceBurnEvent.php
1 <?php
2 
22 namespace pocketmine\event\inventory;
23 
28 
29 class FurnaceBurnEvent extends BlockEvent implements Cancellable{
30  public static $handlerList = null;
31  public static $eventPool = [];
32  public static $nextEvent = 0;
33 
34  private $furnace;
35  private $fuel;
36  private $burnTime;
37  private $burning = true;
38 
39  public function __construct(Furnace $furnace, Item $fuel, $burnTime){
40  parent::__construct($furnace->getBlock());
41  $this->fuel = $fuel;
42  $this->burnTime = (int) $burnTime;
43  $this->furnace = $furnace;
44  }
45 
49  public function getFurnace(){
50  return $this->furnace;
51  }
52 
56  public function getFuel(){
57  return $this->fuel;
58  }
59 
63  public function getBurnTime(){
64  return $this->burnTime;
65  }
66 
70  public function setBurnTime($burnTime){
71  $this->burnTime = (int) $burnTime;
72  }
73 
77  public function isBurning(){
78  return $this->burning;
79  }
80 
84  public function setBurning($burning){
85  $this->burning = (bool) $burning;
86  }
87 }