From a3dea09e2abe08d24da050fdbb27ee5912d2342c Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Thu, 25 Apr 2019 15:19:15 +0100 Subject: [PATCH] sync with latest codegen changes --- .../network/mcpe/protocol/PacketPool.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/pocketmine/network/mcpe/protocol/PacketPool.php b/src/pocketmine/network/mcpe/protocol/PacketPool.php index 58e22900b..992da8f96 100644 --- a/src/pocketmine/network/mcpe/protocol/PacketPool.php +++ b/src/pocketmine/network/mcpe/protocol/PacketPool.php @@ -27,7 +27,7 @@ use pocketmine\utils\Binary; use pocketmine\utils\BinaryDataException; class PacketPool{ - /** @var \SplFixedArray */ + /** @var \SplFixedArray */ protected static $pool = null; public static function init() : void{ @@ -159,28 +159,28 @@ class PacketPool{ } /** - * @param DataPacket $packet + * @param Packet $packet */ - public static function registerPacket(DataPacket $packet) : void{ + public static function registerPacket(Packet $packet) : void{ static::$pool[$packet->pid()] = clone $packet; } /** * @param int $pid * - * @return DataPacket + * @return Packet */ - public static function getPacketById(int $pid) : DataPacket{ + public static function getPacketById(int $pid) : Packet{ return isset(static::$pool[$pid]) ? clone static::$pool[$pid] : new UnknownPacket(); } /** * @param string $buffer * - * @return DataPacket + * @return Packet * @throws BinaryDataException */ - public static function getPacket(string $buffer) : DataPacket{ + public static function getPacket(string $buffer) : Packet{ $offset = 0; $pk = static::getPacketById(Binary::readUnsignedVarInt($buffer, $offset)); $pk->setBuffer($buffer, $offset);