mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Added extra Exceptions
This commit is contained in:
@ -41,7 +41,7 @@ class CraftingInventory extends BaseInventory{
|
||||
*/
|
||||
public function __construct(InventoryHolder $holder, Inventory $resultInventory, InventoryType $inventoryType){
|
||||
if($inventoryType->getDefaultTitle() !== "Crafting"){
|
||||
throw new \Exception("Invalid Inventory type, expected CRAFTING or WORKBENCH");
|
||||
throw new \InvalidStateException("Invalid Inventory type, expected CRAFTING or WORKBENCH");
|
||||
}
|
||||
$this->resultInventory = $resultInventory;
|
||||
parent::__construct($holder, $inventoryType);
|
||||
|
Reference in New Issue
Block a user