Skip to content

Commit

Permalink
1.1.3: fixed plugin update checker latest version number
Browse files Browse the repository at this point in the history
  • Loading branch information
benfiratkaya committed Jul 3, 2024
1 parent 1aa4d03 commit 08ee0e1
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public PluginUpdater(String currentVersion) {
}

public String getLatestVersion() {
return newVersion;
return this.newVersion;
}

public boolean checkForUpdates() throws Exception {
Expand All @@ -43,8 +43,8 @@ public boolean checkForUpdates() throws Exception {
Gson gson = new Gson();
JsonObject jsonObject = gson.fromJson(response.toString(), JsonObject.class);

if (jsonObject.get("newVersion") != null)
newVersion = jsonObject.get("newVersion").getAsString();
if (jsonObject.get("version") != null)
this.newVersion = jsonObject.get("version").getAsString();

return jsonObject.get("update").getAsBoolean();
}
Expand Down

0 comments on commit 08ee0e1

Please sign in to comment.