From 9e100f792f683f85f636e8dbc70193f2fdf5f53f Mon Sep 17 00:00:00 2001 From: Thatsmusic99 Date: Tue, 30 Oct 2018 13:25:56 +0000 Subject: [PATCH] Adjusted to work with Github versions --- .../thatsmusic99/headsplus/HeadsPlus.java | 19 +++++++++++-------- main/resources/plugin.yml | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/main/java/io/github/thatsmusic99/headsplus/HeadsPlus.java b/main/java/io/github/thatsmusic99/headsplus/HeadsPlus.java index 1be12a9..47e334c 100644 --- a/main/java/io/github/thatsmusic99/headsplus/HeadsPlus.java +++ b/main/java/io/github/thatsmusic99/headsplus/HeadsPlus.java @@ -142,15 +142,18 @@ public void run() { e.printStackTrace(); } if (update != null) { - log.info(ChatColor.stripColor(ChatColor.translateAlternateColorCodes('&', LocaleManager.getLocale().getUpdateFound()))); - log.info(ChatColor.stripColor(ChatColor.translateAlternateColorCodes('&', LocaleManager.getLocale().getCurrentVersion())) - + getDescription().getVersion()); - log.info(ChatColor.stripColor(ChatColor.translateAlternateColorCodes('&', LocaleManager.getLocale().getNewVersion() + update[2]))); - if (update[1].toString().length() > 50) { - update[1] = update[1].toString().subSequence(0, 50) + "... (Check Spigot for more information)"; + if (!((String) update[2]).equalsIgnoreCase("5.1.10")) { + log.info(ChatColor.stripColor(ChatColor.translateAlternateColorCodes('&', LocaleManager.getLocale().getUpdateFound()))); + log.info(ChatColor.stripColor(ChatColor.translateAlternateColorCodes('&', LocaleManager.getLocale().getCurrentVersion())) + + getDescription().getVersion()); + log.info(ChatColor.stripColor(ChatColor.translateAlternateColorCodes('&', LocaleManager.getLocale().getNewVersion() + update[2]))); + if (update[1].toString().length() > 50) { + update[1] = update[1].toString().subSequence(0, 50) + "... (Check Spigot for more information)"; + } + log.info(ChatColor.stripColor(ChatColor.translateAlternateColorCodes('&', LocaleManager.getLocale().getDescription())) + update[1]); + log.info("Download link: https://www.spigotmc.org/resources/headsplus-1-8-x-1-12-x.40265/"); + } - log.info(ChatColor.stripColor(ChatColor.translateAlternateColorCodes('&', LocaleManager.getLocale().getDescription())) + update[1]); - log.info("Download link: https://www.spigotmc.org/resources/headsplus-1-8-x-1-12-x.40265/"); } else { log.info(hpc.getString("plugin-up-to-date")); } diff --git a/main/resources/plugin.yml b/main/resources/plugin.yml index 9bfeacd..d7c8a17 100644 --- a/main/resources/plugin.yml +++ b/main/resources/plugin.yml @@ -1,6 +1,6 @@ main: io.github.thatsmusic99.headsplus.HeadsPlus name: HeadsPlus -version: 5.1.10 +version: 5.1.11 api-version: 1.13 description: Spawns in heads with extra features. author: Thatsmusic99