Ejemplo n.º 1
0
 /**
  * @param InventoryHolder $holder
  * @param Inventory       $resultInventory
  * @param InventoryType   $inventoryType
  *
  * @throws \Throwable
  */
 public function __construct(InventoryHolder $holder, Inventory $resultInventory, InventoryType $inventoryType)
 {
     if ($inventoryType->getDefaultTitle() !== "Crafting") {
         throw new \InvalidStateException("Invalid Inventory type, expected CRAFTING or WORKBENCH");
     }
     $this->resultInventory = $resultInventory;
     parent::__construct($holder, $inventoryType);
 }