mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-12-24 01:48:07 +01:00
updated version reading code
This commit is contained in:
parent
a10655d8a8
commit
3fa873315c
@ -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
|
||||||
|
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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);
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user