use pocketmine\network\mcpe\NetworkSession; class NetworkStackLatencyPacket extends DataPacket{ public const NETWORK_ID = ProtocolInfo::NETWORK_STACK_LATENCY_PACKET; /** @var int */ public $timestamp; /** @var bool */ public $needResponse; protected function decodePayload(){ $this->timestamp = $this->getLLong(); $this->needResponse = $this->getBool(); } protected function encodePayload(){ $this->putLLong($this->timestamp); $this->putBool($this->needResponse); } public function handle(NetworkSession $session) : bool{ return $session->handleNetworkStackLatency($this); } }