use pocketmine\network\mcpe\NetworkSession; class VideoStreamConnectPacket extends DataPacket/* implements ClientboundPacket*/{ public const NETWORK_ID = ProtocolInfo::VIDEO_STREAM_CONNECT_PACKET; public const ACTION_CONNECT = 0; public const ACTION_DISCONNECT = 1; /** @var string */ public $serverUri; /** @var float */ public $frameSendFrequency; /** @var int */ public $action; protected function decodePayload() : void{ $this->serverUri = $this->getString(); $this->frameSendFrequency = $this->getLFloat(); $this->action = $this->getByte(); } protected function encodePayload() : void{ $this->putString($this->serverUri); $this->putLFloat($this->frameSendFrequency); $this->putByte($this->action); } public function handle(NetworkSession $session) : bool{ return $session->handleVideoStreamConnect($this); } }