Skip to content

Commit

Permalink
Do not parse server binary if not available
Browse files Browse the repository at this point in the history
Fix #57
  • Loading branch information
tomsik68 committed Aug 5, 2019
1 parent 86fd9aa commit cb757f0
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ static MCDownloadVersion fromJson(JSONObject json) {
if (json.containsKey("downloads")) {
JSONObject downloads = (JSONObject) json.get("downloads");
builder.client = Artifact.fromJson((JSONObject) downloads.get("client"));
builder.server = Artifact.fromJson((JSONObject) downloads.get("server"));
// old_alpha versions do not provide server binaries
if (downloads.containsKey("server"))
builder.server = Artifact.fromJson((JSONObject) downloads.get("server"));
}

if (json.containsKey("incompatibilityReason"))
Expand Down

0 comments on commit cb757f0

Please sign in to comment.