Make version comparisons by long - Support WorldEdit 7.2.11 Beta 1 (#240) (Fixes #245)

This commit is contained in:
dkim19375 2022-06-27 22:15:23 -04:00 committed by GitHub
parent 606c043bf0
commit b450f4d05a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1019,7 +1019,7 @@ public class Util extends Queue {
if (version.contains("-beta-")) {
version = version.split(";")[0];
version = version.split("-beta-")[1];
int value = Integer.parseInt(version.replaceAll("[^0-9]", ""));
long value = Long.parseLong(version.replaceAll("[^0-9]", ""));
if (value < 6) {
validVersion = false;
}
@ -1033,7 +1033,7 @@ public class Util extends Queue {
}
if (version.contains("-")) {
int value = Integer.parseInt(((version.split("-"))[0]).replaceAll("[^0-9]", ""));
long value = Long.parseLong(((version.split("-"))[0]).replaceAll("[^0-9]", ""));
if (value > 0 && value < 4268) {
validVersion = false;
}