37 private array $markers
40 public function getId() : int{ return $this->id; }
42 public function getName() : string{ return $this->name; }
44 public function getTime() : int{ return $this->time; }
46 public function isPaused() : bool{ return $this->paused; }
52 public function getMarkers() : array{ return $this->markers; }
54 public static function read(ByteBufferReader $in) : self{
55 $id = VarInt::readUnsignedLong($in);
56 $name = CommonTypes::getString($in);
57 $time = VarInt::readSignedInt($in);
58 $paused = CommonTypes::getBool($in);
61 for($i = 0, $len = VarInt::readUnsignedInt($in); $i < $len; ++$i){
62 $markers[] = SyncWorldClockMarkerData::read($in);
74 public function write(ByteBufferWriter $out) : void{
75 VarInt::writeUnsignedLong($out, $this->id);
76 CommonTypes::putString($out, $this->name);
77 VarInt::writeSignedInt($out, $this->time);
78 CommonTypes::putBool($out, $this->paused);
80 VarInt::writeUnsignedInt($out, count($this->markers));
81 foreach($this->markers as $marker){