We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4a13f83 commit 579f6f9Copy full SHA for 579f6f9
src/muqsit/invmenu/InvMenuEventHandler.php
@@ -4,6 +4,7 @@
4
5
namespace muqsit\invmenu;
6
7
+use muqsit\invmenu\inventory\InvMenuInventory;
8
use muqsit\invmenu\session\network\PlayerNetwork;
9
use muqsit\invmenu\session\PlayerManager;
10
use pocketmine\event\inventory\InventoryCloseEvent;
@@ -62,6 +63,12 @@ public function onInventoryTransaction(InventoryTransactionEvent $event) : void{
62
63
$player_instance = $this->player_manager->get($player);
64
$current = $player_instance->getCurrent();
65
if($current === null){
66
+ foreach($transaction->getActions() as $action){
67
+ if($action instanceof SlotChangeAction && $action->getInventory() instanceof InvMenuInventory){
68
+ $event->cancel();
69
+ return;
70
+ }
71
72
return;
73
}
74
0 commit comments