pocketmine\inventory\BrewingRecipe::getPotion PHP Method

getPotion() public method

public getPotion ( )
    public function getPotion()
    {
        return clone $this->potion;
    }

Usage Example

Example #1
0
 /**
  * @param BrewingRecipe $recipe
  */
 public function registerBrewingRecipe(BrewingRecipe $recipe)
 {
     $input = $recipe->getInput();
     $potion = $recipe->getPotion();
     $this->brewingRecipes[$input->getId() . ":" . ($potion->getDamage() === null ? "0" : $potion->getDamage())] = $recipe;
 }