From b450f4d05a87f8f50fd2e8958c374adea9698b9a Mon Sep 17 00:00:00 2001 From: dkim19375 <65050767+dkim19375@users.noreply.github.com> Date: Mon, 27 Jun 2022 22:15:23 -0400 Subject: [PATCH] Make version comparisons by long - Support WorldEdit 7.2.11 Beta 1 (#240) (Fixes #245) --- src/main/java/net/coreprotect/utility/Util.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/coreprotect/utility/Util.java b/src/main/java/net/coreprotect/utility/Util.java index 97a071e..9258e9a 100755 --- a/src/main/java/net/coreprotect/utility/Util.java +++ b/src/main/java/net/coreprotect/utility/Util.java @@ -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; }