Skip to content

Commit

Permalink
chore: update server version checking
Browse files Browse the repository at this point in the history
Signed-off-by: Thatsmusic99 <25277367+thatsmusic99@users.noreply.github.com>
  • Loading branch information
Thatsmusic99 committed Sep 26, 2023
1 parent a229f31 commit a847e91
Showing 1 changed file with 1 addition and 8 deletions.
Expand Up @@ -163,14 +163,7 @@ private void checkVersion() {

// Get the version in question.
debug("Performing server version check.");
String bukkitVersion =
Bukkit.getServer()
.getClass()
.getPackage()
.getName()
.replace(".", ",")
.split(",")[3];
int number = Integer.parseInt(bukkitVersion.split("_")[1]);
int number = Integer.parseInt(Bukkit.getBukkitVersion().split("\\.")[1]);
if (number < 17) {
getLogger().severe("!!! YOU ARE USING ADVANCEDTELEPORT ON AN UNSUPPORTED VERSION. !!!");
getLogger().severe("The plugin only receives mainstream support for 1.17.1 to 1.19.x");
Expand Down

0 comments on commit a847e91

Please sign in to comment.