Fix ProtocolLib version check
This commit is contained in:
parent
bf12201452
commit
8e2645501b
@ -2117,15 +2117,15 @@ public class DisguiseUtilities {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isOlderThan(String requiredVersion, String theirVersion) {
|
public static boolean isOlderThan(String requiredVersion, String theirVersion) {
|
||||||
int[] ourVersion = getNumericVersion(requiredVersion);
|
int[] required = getNumericVersion(requiredVersion);
|
||||||
int[] theirs = getNumericVersion(theirVersion);
|
int[] has = getNumericVersion(theirVersion);
|
||||||
|
|
||||||
for (int i = 0; i < Math.min(ourVersion.length, theirs.length); i++) {
|
for (int i = 0; i < Math.min(required.length, has.length); i++) {
|
||||||
if (ourVersion[i] <= theirs[i]) {
|
if (required[i] == has[i]) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return required[i] >= has[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user