this was stupid

This commit is contained in:
Dylan K. Taylor 2019-06-14 19:41:19 +01:00
parent 8356285b66
commit 468340d55b

View File

@ -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 = new InventoryOpenEvent($inventory, $this);
$ev->call(); $ev->call();
if($ev->isCancelled()){ if($ev->isCancelled()){
return -1; return -1;
} }
$this->windowIndex[$networkId] = $inventory;
$this->windows[spl_object_id($inventory)] = $networkId;
$inventory->onOpen($this); $inventory->onOpen($this);
if($isPermanent){ if($isPermanent){
$this->permanentWindows[spl_object_id($inventory)] = true; $this->permanentWindows[spl_object_id($inventory)] = true;