Hello, my Menu is alredy opening. And if it worked and i closed all Window then i can't opening anymore. Please Help. $menu->setListener(function (Player $player, Item $itemClicked) { if ($itemClicked === Item::get(Item::COAL)) { $this->checkRangGUI($player, "Kohle"); } elseif ($itemClicked === Item::get(Item::REDSTONE)) { $this->checkRangGUI($player, "Redstone"); } elseif ($itemClicked === Item::get(Item::IRON_INGOT)) { $this->checkRangGUI($player, "Eisen"); } elseif ($itemClicked === Item::get(Item::GOLD_INGOT)) { $this->checkRangGUI($player, "Gold"); } elseif ($itemClicked === Item::get(Item:IAMOND)) { $this->checkRangGUI($player, "Diamant"); } elseif ($itemClicked === Item::get(Item::EMERALD)) { $this->checkRangGUI($player, "Smaragd"); } elseif ($itemClicked === Item::get(Item::END_PORTAL_FRAME)) { $player->removeAllWindows(); $player->sendMessage(Main:REFIX . "§cMenu geschlossen..."); } });
The client bugs out if the server tells it to close an inventory, the solution would be to just let the player close the inventory
Okk but my problem is that when I interact with the item nothing happens even though it should open the second menu.