mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-17 19:50:18 +00:00
NetworkSession: inject PacketPool instead of hardcoding it
this will make it slightly easier for multi version implementations, but handlers are still quite a big problem.
This commit is contained in:
@@ -37,8 +37,8 @@ class PacketBatch extends NetworkBinaryStream{
|
||||
/**
|
||||
* @throws BinaryDataException
|
||||
*/
|
||||
public function getPacket() : Packet{
|
||||
return PacketPool::getInstance()->getPacket($this->getString());
|
||||
public function getPacket(PacketPool $packetPool) : Packet{
|
||||
return $packetPool->getPacket($this->getString());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user