public function close()
{
if ($this->closed === false) {
foreach ($this->getInventory()->getViewers() as $player) {
$player->removeWindow($this->getInventory());
}
foreach ($this->getInventory()->getViewers() as $player) {
$player->removeWindow($this->getRealInventory());
}
parent::close();
}
}