getRecipe()->getResult() returns the recipe's resulting Item. Something like this if you are trying to ban god apples PHP: if(CraftItemEvent::getRecipe()->getResult()->getId() === Item::ENCHANTED_GOLDEN_APPLE){ $event->setCancelled();}
I am a beginner in coding and I would like to know that she is the "public function" please. Thank you
we will be happy to help you but PLEASE consider making a new post for your needs rather than posting them here