23 public const NETWORK_ID = ProtocolInfo::LESSON_PROGRESS_PACKET;
25 public const ACTION_START = 0;
26 public const ACTION_FINISH = 1;
27 public const ACTION_RESTART = 2;
31 private string $activityId;
36 public static function create(
int $action,
int $score,
string $activityId) : self{
38 $result->action = $action;
39 $result->score = $score;
40 $result->activityId = $activityId;
44 public function getAction() : int{ return $this->action; }
46 public function getScore() : int{ return $this->score; }
48 public function getActivityId() : string{ return $this->activityId; }
51 $this->action = $in->getVarInt();
57 $out->putVarInt($this->action);
59 $out->putString($this->activityId);
63 return $handler->handleLessonProgress($this);