pocketmine\event\inventory\CraftItemEvent::getRecipe PHP Method

getRecipe() public method

public getRecipe ( ) : pocketmine\inventory\Recipe
return pocketmine\inventory\Recipe
    public function getRecipe()
    {
        return $this->recipe;
    }

Usage Example

Esempio n. 1
0
 public function craftEvent(CraftItemEvent $event)
 {
     $ItemId = $event->getRecipe()->getResult()->getId() . ":" . $event->getRecipe()->getResult()->getDamage();
     if ($this->isData($ItemId)) {
         $event->setCancelled(true);
         $event->getPlayer()->sendMessage(TextFormat::RED . $ItemId . "조합 금지 블록을 사용하였습니다");
     }
 }
All Usage Examples Of pocketmine\event\inventory\CraftItemEvent::getRecipe