From 468340d55b4b7301031fb184a5b1be6c900461df Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 14 Jun 2019 19:41:19 +0100 Subject: [PATCH] this was stupid --- src/pocketmine/Player.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index c47959890..c83efc73c 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -2812,14 +2812,14 @@ class Player extends Human implements CommandSender, ChunkLoader, ChunkListener, } } - $this->windowIndex[$networkId] = $inventory; - $this->windows[spl_object_id($inventory)] = $networkId; - $ev = new InventoryOpenEvent($inventory, $this); $ev->call(); if($ev->isCancelled()){ return -1; } + + $this->windowIndex[$networkId] = $inventory; + $this->windows[spl_object_id($inventory)] = $networkId; $inventory->onOpen($this); if($isPermanent){ $this->permanentWindows[spl_object_id($inventory)] = true;