diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 5ebe1e9b8..78b3634bb 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -3780,10 +3780,8 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{ } $inventory->close($this); - - unset($this->windows[$hash]); if($id !== null){ - unset($this->windowIndex[$id], $this->permanentWindows[$id]); + unset($this->windows[$hash], $this->windowIndex[$id], $this->permanentWindows[$id]); } }