Try this: PHP: use pocketmine\event\inventory\InventoryOpenEvent; public function open_inventory(InventoryOpenEvent $event){ $event->setCancelled(); }}
Simple workaround: When editing the inventory, add players to an array. In the events, search for the player in the array. This way you can bypass these events