More anti-leak measures for double chest inventory issues

This commit is contained in:
Dylan K. Taylor 2017-03-19 11:25:56 +00:00
parent 4c61ad9f2d
commit 2673e4de7f
2 changed files with 7 additions and 0 deletions

View File

@ -63,6 +63,10 @@ class Chest extends Spawnable implements InventoryHolder, Container, Nameable{
foreach($this->getInventory()->getViewers() as $player){
$player->removeWindow($this->getRealInventory());
}
$this->inventory = null;
$this->doubleInventory = null;
parent::close();
}
}

View File

@ -92,6 +92,9 @@ class Furnace extends Spawnable implements InventoryHolder, Container, Nameable{
foreach($this->getInventory()->getViewers() as $player){
$player->removeWindow($this->getInventory());
}
$this->inventory = null;
parent::close();
}
}