mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-24 20:34:02 +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\PacketPool;
|
||||
use pocketmine\utils\BinaryDataException;
|
||||
|
||||
class PacketStream extends NetworkBinaryStream{
|
||||
|
||||
@ -35,6 +36,10 @@ class PacketStream extends NetworkBinaryStream{
|
||||
$this->putString($packet->getBuffer());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Packet
|
||||
* @throws BinaryDataException
|
||||
*/
|
||||
public function getPacket() : Packet{
|
||||
return PacketPool::getPacket($this->getString());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user