mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 02:08:21 +00:00
Added extra Exceptions
This commit is contained in:
@ -44,11 +44,11 @@ class ShapelessRecipe implements Recipe{
|
||||
*
|
||||
* @returns ShapelessRecipe
|
||||
*
|
||||
* @throws \Exception
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public function addIngredient(Item $item){
|
||||
if(count($this->ingredients) >= 9){
|
||||
throw new \Exception("Shapeless recipes cannot have more than 9 ingredients");
|
||||
throw new \InvalidArgumentException("Shapeless recipes cannot have more than 9 ingredients");
|
||||
}
|
||||
|
||||
$it = clone $item;
|
||||
|
Reference in New Issue
Block a user