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