PocketMine-MP  1.4 - API 1.10.0
 All Classes Namespaces Functions Variables Pages
EntityInventoryChangeEvent.php
1 <?php
2 
22 namespace pocketmine\event\entity;
23 
25 use pocketmine\Event;
28 
30  public static $handlerList = null;
31  public static $eventPool = [];
32  public static $nextEvent = 0;
33 
34  private $oldItem;
35  private $newItem;
36  private $slot;
37 
38  public function __construct(Entity $entity, Item $oldItem, Item $newItem, $slot){
39  $this->entity = $entity;
40  $this->oldItem = $oldItem;
41  $this->newItem = $newItem;
42  $this->slot = (int) $slot;
43  }
44 
45  public function getSlot(){
46  return $this->slot;
47  }
48 
49  public function getNewItem(){
50  return $this->newItem;
51  }
52 
53  public function setNewItem(Item $item){
54  $this->newItem = $item;
55  }
56 
57  public function getOldItem(){
58  return $this->oldItem;
59  }
60 
61 
62 }