Ensure inventories get evacuated on server-side window close

This commit is contained in:
Dylan K. Taylor 2021-11-08 23:48:05 +00:00
parent ab002ca06d
commit 5be429a8c4
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -2399,6 +2399,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
}
public function removeCurrentWindow() : void{
$this->doCloseInventory();
if($this->currentWindow !== null){
(new InventoryCloseEvent($this->currentWindow, $this))->call();