Rework inventory window open/close handling

- This fixes InventoryOpenEvent and InventoryCloseEvent being fired for persistent windows. Close #2950
- The ability to specify a custom network ID to assign the inventory to in addWindow() has been removed.
- The ability to assign a non-removable window in addWindow() has been removed.
- The ability to remove non-removable windows in removeWindow() and removeAllWindows() has been removed. This was previously needed for internal purposes.
This commit is contained in:
Dylan K. Taylor
2019-06-15 14:23:02 +01:00
parent c77e75fa93
commit 50a7fc0ba3
8 changed files with 65 additions and 59 deletions

View File

@ -855,8 +855,8 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
}
protected function onDispose() : void{
$this->inventory->removeAllViewers(true);
$this->enderChestInventory->removeAllViewers(true);
$this->inventory->removeAllViewers();
$this->enderChestInventory->removeAllViewers();
parent::onDispose();
}