Muqsit / InvMenu

A PocketMine-MP virion to create and manage virtual inventories!
https://poggit.pmmp.io/ci/Muqsit/InvMenu/~
GNU General Public License v3.0
201 stars 75 forks source link

InvMenu::TYPE_DOUBLE_CHEST does not work #1

Closed Muqsit closed 6 years ago

Muqsit commented 6 years ago

This hasn't been correctly implemented due to the slight complexity that double chests offer.

bruno1069 commented 6 years ago

Question

How to do when the player clicks an item in Inv Menu the Menu close?

Muqsit commented 6 years ago

@Bruno1069

/** @var InvMenu $menu */
$menu->setListener(function(Player $player, Item $item1, Item $item2, SlotChangeAction $invAction) : bool{
    $player->removeWindow($invAction->getInventory());
});
bruno1069 commented 6 years ago

Thanks

alair069 commented 6 years ago

image

Is not setListener?

Muqsit commented 6 years ago

@alair069 thanks, but please open a new issue next time 👍 https://github.com/Muqsit/InvMenu/commit/b6cc5363338285155de0cf7842e35a4eb910d280