mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-25 04:44:03 +00:00
PacketStream: add @throws
This commit is contained in:
parent
c2771eba88
commit
3415edf600
@ -25,6 +25,7 @@ namespace pocketmine\network\mcpe;
|
|||||||
|
|
||||||
use pocketmine\network\mcpe\protocol\Packet;
|
use pocketmine\network\mcpe\protocol\Packet;
|
||||||
use pocketmine\network\mcpe\protocol\PacketPool;
|
use pocketmine\network\mcpe\protocol\PacketPool;
|
||||||
|
use pocketmine\utils\BinaryDataException;
|
||||||
|
|
||||||
class PacketStream extends NetworkBinaryStream{
|
class PacketStream extends NetworkBinaryStream{
|
||||||
|
|
||||||
@ -35,6 +36,10 @@ class PacketStream extends NetworkBinaryStream{
|
|||||||
$this->putString($packet->getBuffer());
|
$this->putString($packet->getBuffer());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Packet
|
||||||
|
* @throws BinaryDataException
|
||||||
|
*/
|
||||||
public function getPacket() : Packet{
|
public function getPacket() : Packet{
|
||||||
return PacketPool::getPacket($this->getString());
|
return PacketPool::getPacket($this->getString());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user