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