mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-14 15:35:31 +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.
|
//initiated the close and expect an ack.
|
||||||
$this->session->sendDataPacket(ContainerClosePacket::create($id, false));
|
$this->session->sendDataPacket(ContainerClosePacket::create($id, false));
|
||||||
|
|
||||||
if($this->pendingOpenWindowCallback !== null && $id === $this->pendingCloseWindowId){
|
if($this->pendingCloseWindowId === $id){
|
||||||
$this->session->getLogger()->debug("Opening deferred window after close ack of window $id");
|
|
||||||
$this->pendingCloseWindowId = null;
|
$this->pendingCloseWindowId = null;
|
||||||
($this->pendingOpenWindowCallback)();
|
if($this->pendingOpenWindowCallback !== null){
|
||||||
$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