entity = $entity; $this->oldItem = $oldItem; $this->newItem = $newItem; $this->slot = $slot; } /** * Returns the inventory slot number affected by the event. * @return int */ public function getSlot() : int{ return $this->slot; } /** * Returns the item which will be in the slot after the event. * @return Item */ public function getNewItem() : Item{ return $this->newItem; } /** * @param Item $item */ public function setNewItem(Item $item) : void{ $this->newItem = $item; } /** * Returns the item currently in the slot. * @return Item */ public function getOldItem() : Item{ return $this->oldItem; } }