mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-11 05:55:33 +00:00
Added encode/decode for ModalFormResponsePacket
This commit is contained in:
parent
5a4fbc6f5a
commit
02cbf800d0
@ -30,12 +30,19 @@ use pocketmine\network\mcpe\NetworkSession;
|
||||
class ModalFormResponsePacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::MODAL_FORM_RESPONSE_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $formId;
|
||||
/** @var string */
|
||||
public $formData; //json
|
||||
|
||||
protected function decodePayload(){
|
||||
//TODO
|
||||
$this->formId = $this->getUnsignedVarInt();
|
||||
$this->formData = $this->getString();
|
||||
}
|
||||
|
||||
protected function encodePayload(){
|
||||
//TODO
|
||||
$this->putUnsignedVarInt($this->formId);
|
||||
$this->putString($this->formData);
|
||||
}
|
||||
|
||||
public function handle(NetworkSession $session) : bool{
|
||||
|
Loading…
x
Reference in New Issue
Block a user