Add /ld updateprotocollib, improve version checking for nms

This commit is contained in:
libraryaddict
2020-06-30 16:06:27 +12:00
parent 31672fce7b
commit f3d5f7efc3
7 changed files with 185 additions and 48 deletions

View File

@@ -80,17 +80,6 @@ public class LibsDisguises extends JavaPlugin {
"reloads gracefully!");
}
String version = ProtocolLibrary.getPlugin().getDescription().getVersion();
String requiredProtocolLib = "4.5.1";
if (DisguiseUtilities.isOlderThan(requiredProtocolLib, version)) {
getLogger().severe("!! Attention please !!");
getLogger().severe("Update your ProtocolLib! You are running " + version +
" but the minimum version you should be on is " + requiredProtocolLib + "!");
getLogger().severe("!! Attention please !!");
}
try {
Class cl = Class.forName("org.bukkit.Server$Spigot");
}
@@ -131,6 +120,19 @@ public class LibsDisguises extends JavaPlugin {
return;
}
String requiredProtocolLib = DisguiseUtilities.getProtocolLibRequiredVersion();
String version = ProtocolLibrary.getPlugin().getDescription().getVersion();
if (DisguiseUtilities.isOlderThan(requiredProtocolLib, version)) {
getLogger().severe("!! May I have your attention please !!");
getLogger().severe("Update your ProtocolLib! You are running " + version +
" but the minimum version you should be on is " + requiredProtocolLib + "!");
getLogger()
.severe("https://ci.dmulloy2.net/job/ProtocolLib/lastSuccessfulBuild/artifact/target/ProtocolLib" +
".jar");
getLogger().severe("!! May I have your attention please !!");
}
// If this is a release build, even if jenkins build..
if (isReleaseBuild()) {
// If downloaded from spigot, forcibly set release build to true