Fix bug causing the Updater to not work.

This commit is contained in:
MattBDev 2016-03-27 23:48:24 -04:00
parent 93ef066d7b
commit 978be89e52

View File

@ -46,7 +46,7 @@ public class Updater {
String str = readUrl("https://api.github.com/repos/IntellectualSites/PlotSquared/releases/latest"); String str = readUrl("https://api.github.com/repos/IntellectualSites/PlotSquared/releases/latest");
JSONObject release = new JSONObject(str); JSONObject release = new JSONObject(str);
JSONArray assets = (JSONArray) release.get("assets"); JSONArray assets = (JSONArray) release.get("assets");
String downloadURL = String.format("PlotSquared-%s%n.jar", PS.get().getPlatform()); String downloadURL = String.format("PlotSquared-%s.jar", PS.get().getPlatform());
for (int i = 0; i < assets.length(); i++) { for (int i = 0; i < assets.length(); i++) {
JSONObject asset = assets.getJSONObject(i); JSONObject asset = assets.getJSONObject(i);
String name = asset.getString("name"); String name = asset.getString("name");