updated version reading code

This commit is contained in:
Sekwah 2018-08-26 02:48:27 +01:00 committed by Sekwah
parent a10655d8a8
commit 3fa873315c
4 changed files with 7 additions and 7 deletions

View File

@ -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 # Disable with --no-build-cache
org.gradle.caching=true org.gradle.caching=true

View File

@ -70,8 +70,8 @@ public class AdvancedPortalsCore {
} }
private int checkMcVer(int[] mcVer) { private int checkMcVer(int[] mcVer) {
int maxSupportedVer = 12; int maxSupportedVer = 13;
int minSupportedVer = 8; int minSupportedVer = 13;
if(mcVer.length == 2 || mcVer.length == 3) { if(mcVer.length == 2 || mcVer.length == 3) {
if(mcVer[0] == 1) { if(mcVer[0] == 1) {
if(mcVer[1] < minSupportedVer) { if(mcVer[1] < minSupportedVer) {
@ -87,8 +87,8 @@ public class AdvancedPortalsCore {
} }
} }
else { else {
this.infoLogger.logWarning("It seems you are using a very strange version of minecraft or something is " + 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."); "seriously wrong with the plugin for getting the version of Minecraft.");
return maxSupportedVer; return maxSupportedVer;
} }
} }

View File

@ -25,7 +25,7 @@ public class AdvancedPortalsPlugin extends JavaPlugin {
Metrics metrics = new Metrics(this); 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()); Matcher m = p.matcher(Bukkit.getVersion());
if(m.find()) { if(m.find()) {
String version = m.group(1); String version = m.group(1);

View File

@ -19,7 +19,7 @@ translatedata.replaced= A new \u00A7een_GB\u00A7a file has been copied to the da
messageprefix.positive=\u00A7a[\u00A7eAdvancedPortals\u00A7a] messageprefix.positive=\u00A7a[\u00A7eAdvancedPortals\u00A7a]
messageprefix.negative=\u00A7c[\u00A77AdvancedPortals\u00A7c] 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.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 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