1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

muqsit-Listener

Discussion in 'Help' started by HannesTheDev, Feb 8, 2021.

  1. HannesTheDev

    HannesTheDev Spider

    Messages:
    7
    GitHub:
    HannesTheDev
    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::DIAMOND)) {
    $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::pREFIX . "§cMenu geschlossen...");
    }
    });
     
  2. wolfdale

    wolfdale Zombie Pigman

    Messages:
    535
    GitHub:
    diamond-gold
    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
     
  3. HannesTheDev

    HannesTheDev Spider

    Messages:
    7
    GitHub:
    HannesTheDev
    Okk but my problem is that when I interact with the item nothing happens even though it should open the second menu.
     
  4. wolfdale

    wolfdale Zombie Pigman

    Messages:
    535
    GitHub:
    diamond-gold
    Show your code?
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.