mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-11 04:17:48 +00:00
Player: fixed removeWindow() sometimes removing GUI / crashing clients
This commit is contained in:
parent
79b7e08e60
commit
0c3b136a8d
@ -3904,8 +3904,8 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
|||||||
throw new \InvalidArgumentException("Cannot remove fixed window $id (" . get_class($inventory) . ") from " . $this->getName());
|
throw new \InvalidArgumentException("Cannot remove fixed window $id (" . get_class($inventory) . ") from " . $this->getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
$inventory->close($this);
|
|
||||||
if($id !== null){
|
if($id !== null){
|
||||||
|
$inventory->close($this);
|
||||||
unset($this->windows[$hash], $this->windowIndex[$id], $this->permanentWindows[$id]);
|
unset($this->windows[$hash], $this->windowIndex[$id], $this->permanentWindows[$id]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user