mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
InventoryManager: fixed windows not opening when the server removes windows
closes #5094
This commit is contained in:
parent
e12e4e8fb8
commit
e040c2b281
@ -269,11 +269,13 @@ class InventoryManager{
|
||||
//initiated the close and expect an ack.
|
||||
$this->session->sendDataPacket(ContainerClosePacket::create($id, false));
|
||||
|
||||
if($this->pendingOpenWindowCallback !== null && $id === $this->pendingCloseWindowId){
|
||||
$this->session->getLogger()->debug("Opening deferred window after close ack of window $id");
|
||||
if($this->pendingCloseWindowId === $id){
|
||||
$this->pendingCloseWindowId = null;
|
||||
($this->pendingOpenWindowCallback)();
|
||||
$this->pendingOpenWindowCallback = null;
|
||||
if($this->pendingOpenWindowCallback !== null){
|
||||
$this->session->getLogger()->debug("Opening deferred window after close ack of window $id");
|
||||
($this->pendingOpenWindowCallback)();
|
||||
$this->pendingOpenWindowCallback = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user