mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Added BaseInventory->removeAllViewers()
This commit is contained in:
@ -541,10 +541,7 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
|
||||
public function close(){
|
||||
if(!$this->closed){
|
||||
if($this->inventory !== null){
|
||||
foreach($this->inventory->getViewers() as $viewer){
|
||||
$viewer->removeWindow($this->inventory);
|
||||
}
|
||||
|
||||
$this->inventory->removeAllViewers(true);
|
||||
$this->inventory = null;
|
||||
}
|
||||
parent::close();
|
||||
|
Reference in New Issue
Block a user