mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Added BaseInventory->removeAllViewers()
This commit is contained in:
@ -59,15 +59,10 @@ class Chest extends Spawnable implements InventoryHolder, Container, Nameable{
|
||||
|
||||
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());
|
||||
}
|
||||
$this->inventory->removeAllViewers(true);
|
||||
|
||||
if($this->doubleInventory !== null){
|
||||
$this->doubleInventory->removeAllViewers(true);
|
||||
$this->doubleInventory->invalidate();
|
||||
$this->doubleInventory = null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user