Can you help me with this code, I get an error on line 63 is the following code The error marks me in the code of $mao = $player->getItemInHand(); Is it well written? public function onMenu(PlayerInteractEvent $e){ $player = $e->getPlayer(); $mao = $player->getItemInHand();
lol the error is obvious You can’t access getItemInHand() from the player object, you need to use $player->getInventory()->getItemInHand();