mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-04 17:20:02 +00:00
Remove useless else branch and and return unhandled for unmatched window IDs
This commit is contained in:
parent
d3d1e32309
commit
72d40860f3
@ -2798,11 +2798,10 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
|||||||
if(isset($this->windowIndex[$packet->windowId])){
|
if(isset($this->windowIndex[$packet->windowId])){
|
||||||
$this->server->getPluginManager()->callEvent(new InventoryCloseEvent($this->windowIndex[$packet->windowId], $this));
|
$this->server->getPluginManager()->callEvent(new InventoryCloseEvent($this->windowIndex[$packet->windowId], $this));
|
||||||
$this->removeWindow($this->windowIndex[$packet->windowId]);
|
$this->removeWindow($this->windowIndex[$packet->windowId]);
|
||||||
}else{
|
return true;
|
||||||
unset($this->windowIndex[$packet->windowId]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function handlePlayerHotbar(PlayerHotbarPacket $packet){
|
public function handlePlayerHotbar(PlayerHotbarPacket $packet){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user