From 1421dc93bc5bacd35a1e31e6be1fc2df9d95db3e Mon Sep 17 00:00:00 2001 From: Zombie_Striker Date: Fri, 24 May 2019 17:46:07 -0400 Subject: [PATCH] 4.3.54 --- pom.xml | 2 +- resources/changelog.txt | 7 +++++++ resources/plugin.yml | 2 +- src/com/blueskullgames/horserpg/utils/GithubUpdater.java | 5 +++-- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 97a388c..d486ef3 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 me.zombie_striker mcMMOHorses - 4.3.53 + 4.3.54 diff --git a/resources/changelog.txt b/resources/changelog.txt index b0181a6..60746df 100644 --- a/resources/changelog.txt +++ b/resources/changelog.txt @@ -1,3 +1,10 @@ +Version 4.3.54 + Fixed b that breaks updater + Fixed updater to ignore letters in update titles + +Version 4.3.53b + Fixed 1.13 support + Version 4.3.53 Updated to 1.14 Updated to Maven diff --git a/resources/plugin.yml b/resources/plugin.yml index 7738237..91d02c2 100644 --- a/resources/plugin.yml +++ b/resources/plugin.yml @@ -4,7 +4,7 @@ version: ${project.version} description: An awesome role-playing plugin for horses. authors: [GetGoodKid,Zombie_Striker] website: http://www.blueskullgames.com -api-version: 1.14 +api-version: 1.13 permissions: mcmmohorses.user: default: true diff --git a/src/com/blueskullgames/horserpg/utils/GithubUpdater.java b/src/com/blueskullgames/horserpg/utils/GithubUpdater.java index f756555..0280037 100644 --- a/src/com/blueskullgames/horserpg/utils/GithubUpdater.java +++ b/src/com/blueskullgames/horserpg/utils/GithubUpdater.java @@ -30,12 +30,13 @@ public static boolean autoUpdate(final Plugin main, String author, String github String parsedTagName = tagname.replace(".", ""); - int latestVersion = Integer.valueOf(parsedTagName.substring(1, parsedTagName.length())); + int latestVersion = Integer.valueOf(parsedTagName.substring(1, parsedTagName.length()).replaceAll("[^\\d.]", "")); + int parsedVersion = Integer.parseInt(parseVersion.replaceAll("[^\\d.]", "")); final URL download = new URL("https://github.com/" + author + "/" + githubProject + "/releases/download/" + tagname + "/" + jarname); - if (latestVersion > Integer.parseInt(parseVersion)) { + if (latestVersion > parsedVersion) { Bukkit.getConsoleSender() .sendMessage(ChatColor.GREEN + "Found a new version of " + ChatColor.GOLD + main.getDescription().getName() + ": " + ChatColor.WHITE + tagname