Skip to content

Commit

Permalink
Fix version parsing (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
bonn2 committed Jul 22, 2024
1 parent 842d4a7 commit 32c0da9
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 32c0da9

Please sign in to comment.