use pocketmine\network\mcpe\NetworkSession; class SetTimePacket extends DataPacket{ public const NETWORK_ID = ProtocolInfo::SET_TIME_PACKET; /** @var int */ public $time; protected function decodePayload(){ $this->time = $this->getVarInt(); } protected function encodePayload(){ $this->putVarInt($this->time); } public function handle(NetworkSession $session) : bool{ return $session->handleSetTime($this); } }