updated version reading code

This commit is contained in:
Sekwah 2018-08-26 02:48:27 +01:00
parent 60c94ac60f
commit 1aca0f1d2a
5 changed files with 8 additions and 8 deletions

View File

@ -54,7 +54,7 @@ task runJar() {
javaexec {
main "-jar"
args "${System.env.MC_SERVER_LOC}\\${System.env.MC_SERVER_JAR}.jar"
jvmArgs "-DIReallyKnowWhatIAmDoingISwear=true -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"
jvmArgs = ["-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005", "-DIReallyKnowWhatIAmDoingISwear=true"]
workingDir "${System.env.MC_SERVER_LOC}"
}
}

View File

@ -1,3 +1,3 @@
# 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

View File

@ -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;
}
}

View File

@ -24,7 +24,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);

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.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