Table of Contents

Class VerifiedJarDownload

Namespace
McServerLauncher.Services
Assembly
McServerLauncher.dll

Fetching a server jar: announce the size, download atomically, verify, say it is done.

public static class VerifiedJarDownload
Inheritance
VerifiedJarDownload
Inherited Members

Remarks

Paper and Purpur had a copy each, identical apart from the record type and the hash algorithm — and the algorithm is the one part that genuinely differs, because Purpur publishes only an MD5 while Paper publishes SHA-256. Everything around it, including the three progress messages, was the same text twice.

The hash being optional is deliberate and unchanged: a build with no published checksum is downloaded without one rather than refused, because HTTPS from the project's own API is what authenticates it and the checksum is here to catch a truncated file. That is the opposite of the rule for mods and for Geyser's own artifacts, where a missing checksum means no install — those call their own paths and are not affected by this.

Methods

ToFileAsync(HttpClient, string, string, string?, HashAlgorithmName, IProgress<string>?, CancellationToken)

public static Task ToFileAsync(HttpClient http, string url, string destPath, string? expectedHash, HashAlgorithmName algorithm, IProgress<string>? log, CancellationToken ct = default)

Parameters

http HttpClient
url string
destPath string
expectedHash string
algorithm HashAlgorithmName
log IProgress<string>
ct CancellationToken

Returns

Task