mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-19 15:35:52 +00:00
Fixed #2340
This commit is contained in:
parent
f4181a6e36
commit
b1c4578726
@ -208,13 +208,10 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
|
||||
public function close(){
|
||||
if(!$this->closed){
|
||||
if(!($this instanceof Player) or $this->loggedIn){
|
||||
foreach($this->getInventory()->getViewers() as $player){
|
||||
$this->getInventory()->close($player);
|
||||
foreach($this->inventory->getViewers() as $viewer){
|
||||
$viewer->removeWindow($this->inventory);
|
||||
}
|
||||
}
|
||||
foreach($this->inventory->getViewers() as $viewer){
|
||||
$viewer->removeWindow($this->inventory);
|
||||
}
|
||||
parent::close();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user