From 32c0da9dead0863647e25c9718e79826121ed4d3 Mon Sep 17 00:00:00 2001 From: Brett Bonifas Date: Mon, 22 Jul 2024 15:58:29 -0400 Subject: [PATCH] Fix version parsing (again) --- .../net/bonn2/bigdoorsphysics.versions/VersionUtil.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/versions/src/main/java/net/bonn2/bigdoorsphysics.versions/VersionUtil.java b/versions/src/main/java/net/bonn2/bigdoorsphysics.versions/VersionUtil.java index 8e9a966..49c0778 100644 --- a/versions/src/main/java/net/bonn2/bigdoorsphysics.versions/VersionUtil.java +++ b/versions/src/main/java/net/bonn2/bigdoorsphysics.versions/VersionUtil.java @@ -30,7 +30,11 @@ public interface VersionUtil { double getShulkerOffset(); static int getMajorVersion() { - return Integer.parseInt(Bukkit.getVersion().split("\\.")[1].replace(")", "")); + return Integer.parseInt(Bukkit.getVersion() + .split("\\.")[1] + .replace(")", "") + .split("-")[0] + ); } static boolean isSpigot() {