mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Fixed crash when chests are closed with viewers
This commit is contained in:
@ -67,6 +67,15 @@ class Furnace extends Tile implements InventoryHolder, Container{
|
||||
}
|
||||
}
|
||||
|
||||
public function close(){
|
||||
if($this->closed === false){
|
||||
foreach($this->getInventory()->getViewers() as $player){
|
||||
$this->getInventory()->close($player);
|
||||
}
|
||||
parent::close();
|
||||
}
|
||||
}
|
||||
|
||||
public function saveNBT(){
|
||||
$this->namedtag->Items = new Enum("Inventory", []);
|
||||
$this->namedtag->Items->setTagType(NBT::TAG_Compound);
|
||||
|
Reference in New Issue
Block a user