Player: Fixed logical nonsense in removeWindow()

The only time this is set anyway is obviously if the ID is non-null.
This commit is contained in:
Dylan K. Taylor 2018-01-27 11:02:03 +00:00
parent ef816c0a52
commit ffb3e2b47a

View File

@ -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]);
}
}