mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-17 00:44:08 +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(){
|
public function close(){
|
||||||
if(!$this->closed){
|
if(!$this->closed){
|
||||||
if(!($this instanceof Player) or $this->loggedIn){
|
if(!($this instanceof Player) or $this->loggedIn){
|
||||||
foreach($this->getInventory()->getViewers() as $player){
|
foreach($this->inventory->getViewers() as $viewer){
|
||||||
$this->getInventory()->close($player);
|
$viewer->removeWindow($this->inventory);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach($this->inventory->getViewers() as $viewer){
|
|
||||||
$viewer->removeWindow($this->inventory);
|
|
||||||
}
|
|
||||||
parent::close();
|
parent::close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user