Code: <?php namespace Soup; use pocketmine\event\player\PlayersInteractEvent; use pocketmine\event\entity\EntityDamageEvent; use pocketmine\event\entity\EntityDamageByEntityEvent; use pocketmine\event\Listener; use pocketmine\plugin\PluginBase; use pocketmine\Server; use pocketmine\Player; class Main extends PluginBase implements Listener{ public function onEnable() { $this->getServer()->getPluginManager()->registerEvents($this,$this); } public function onInteract(PlayerInteractEvent $event) { $player = $event->getPlayer(); $item = $event->getItem(); if($item->getId() === Item::MUSHROOM_STEW){ $player->getInventory()->removeItem($item); $player->setHealth($player->getHealth() + 5); $player->setFood(20); } } } This is what I used for a “ Soup Heal Plugin”. I get 0 console errors but the plugin still wont enable not sure what I did wrong as I am new to this stuff.
I got the plugin enabled I fixed the PlayerInteractEvent but now the actual plugin wont work. When I tap soup on floor it doesnt do anything. This is the only way I could think of getting Mushroom_Stew to heal. any help?