mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 16:51:42 +00:00
BatchPacket: use PacketPool::getPacket() instead of getPacketById()
this is what getPacket() is for.
This commit is contained in:
parent
2dd1878d57
commit
732b931556
@ -108,13 +108,12 @@ class BatchPacket extends DataPacket{
|
||||
}
|
||||
|
||||
foreach($this->getPackets() as $buf){
|
||||
$pk = PacketPool::getPacketById(ord($buf{0}));
|
||||
$pk = PacketPool::getPacket($buf);
|
||||
|
||||
if(!$pk->canBeBatched()){
|
||||
throw new \InvalidArgumentException("Received invalid " . get_class($pk) . " inside BatchPacket");
|
||||
}
|
||||
|
||||
$pk->setBuffer($buf, 1);
|
||||
$session->handleDataPacket($pk);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user