Fix ProtocolLib version check

This commit is contained in:
libraryaddict 2020-07-01 12:29:49 +12:00
parent bf12201452
commit 8e2645501b

View File

@ -2117,15 +2117,15 @@ public class DisguiseUtilities {
}
public static boolean isOlderThan(String requiredVersion, String theirVersion) {
int[] ourVersion = getNumericVersion(requiredVersion);
int[] theirs = getNumericVersion(theirVersion);
int[] required = getNumericVersion(requiredVersion);
int[] has = getNumericVersion(theirVersion);
for (int i = 0; i < Math.min(ourVersion.length, theirs.length); i++) {
if (ourVersion[i] <= theirs[i]) {
for (int i = 0; i < Math.min(required.length, has.length); i++) {
if (required[i] == has[i]) {
continue;
}
return true;
return required[i] >= has[i];
}
return false;