From 3fa873315cdbee668a17b3aa95c4920327b09a14 Mon Sep 17 00:00:00 2001 From: Sekwah Date: Sun, 26 Aug 2018 02:48:27 +0100 Subject: [PATCH] updated version reading code --- gradle.properties | 2 +- .../sekwah/advancedportals/core/AdvancedPortalsCore.java | 8 ++++---- .../advancedportals/spigot/AdvancedPortalsPlugin.java | 2 +- src/main/resources/lang/en_GB.lang | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gradle.properties b/gradle.properties index 5eb1064a..23082022 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -# https://docs.gradle.org/current/userguide/build_environment.html +z# https://docs.gradle.org/current/userguide/build_environment.html # Disable with --no-build-cache org.gradle.caching=true diff --git a/src/main/java/com/sekwah/advancedportals/core/AdvancedPortalsCore.java b/src/main/java/com/sekwah/advancedportals/core/AdvancedPortalsCore.java index 59a5a01f..f1ebf588 100644 --- a/src/main/java/com/sekwah/advancedportals/core/AdvancedPortalsCore.java +++ b/src/main/java/com/sekwah/advancedportals/core/AdvancedPortalsCore.java @@ -70,8 +70,8 @@ public class AdvancedPortalsCore { } private int checkMcVer(int[] mcVer) { - int maxSupportedVer = 12; - int minSupportedVer = 8; + int maxSupportedVer = 13; + int minSupportedVer = 13; if(mcVer.length == 2 || mcVer.length == 3) { if(mcVer[0] == 1) { if(mcVer[1] < minSupportedVer) { @@ -87,8 +87,8 @@ public class AdvancedPortalsCore { } } else { - this.infoLogger.logWarning("It seems you are using a very strange version of minecraft or something is " + - "seriously wrong with the plugin for getting the version of minecraft."); + this.infoLogger.logWarning("It seems you are using a very strange version of Minecraft or something is " + + "seriously wrong with the plugin for getting the version of Minecraft."); return maxSupportedVer; } } diff --git a/src/main/java/com/sekwah/advancedportals/spigot/AdvancedPortalsPlugin.java b/src/main/java/com/sekwah/advancedportals/spigot/AdvancedPortalsPlugin.java index 6cb756ca..72a6d420 100644 --- a/src/main/java/com/sekwah/advancedportals/spigot/AdvancedPortalsPlugin.java +++ b/src/main/java/com/sekwah/advancedportals/spigot/AdvancedPortalsPlugin.java @@ -25,7 +25,7 @@ public class AdvancedPortalsPlugin extends JavaPlugin { Metrics metrics = new Metrics(this); - Pattern p = Pattern.compile("\\(MC:\\s([0-9].[0-9]+.[0-9]+)\\)"); + Pattern p = Pattern.compile("\\(MC:\\s([0-9].[0-9]+.?[0-9]+)\\)"); Matcher m = p.matcher(Bukkit.getVersion()); if(m.find()) { String version = m.group(1); diff --git a/src/main/resources/lang/en_GB.lang b/src/main/resources/lang/en_GB.lang index 7a734018..2fa98a60 100644 --- a/src/main/resources/lang/en_GB.lang +++ b/src/main/resources/lang/en_GB.lang @@ -19,7 +19,7 @@ translatedata.replaced= A new \u00A7een_GB\u00A7a file has been copied to the da messageprefix.positive=\u00A7a[\u00A7eAdvancedPortals\u00A7a] messageprefix.negative=\u00A7c[\u00A77AdvancedPortals\u00A7c] -logger.pluginenable=Advanced portals have been successfully enabled! +logger.pluginenable=Advanced portals have been enabled! logger.plugindisable=Advanced portals are being disabled! logger.plugincrafterror=This version of craftbukkit is not yet supported or something went wrong, please post this message with the version number and the above stacktrace in an issue on GitHub v:%1$s