Skip to content

Commit

Permalink
Fix crash on Paper
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgH93 committed May 9, 2024
1 parent 212e1b2 commit 0811e56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,9 @@ public void reload()

public void warnOnVersionIncompatibility()
{
String name = Bukkit.getServer().getClass().getPackage().getName();
String[] version = name.substring(name.lastIndexOf('.') + 2).split("_");
getLogger().warning(ConsoleColor.RED + "################################" + ConsoleColor.RESET);
getLogger().warning(ConsoleColor.RED + String.format("Your minecraft version (MC %1$s) is currently not compatible with this plugins version (%2$s). " +
"Please check for updates!", version[0] + "." + version[1], getDescription().getVersion()) + ConsoleColor.RESET);
"Please check for updates!", Bukkit.getServer().getVersion(), getDescription().getVersion()) + ConsoleColor.RESET);
getLogger().warning(ConsoleColor.RED + "################################" + ConsoleColor.RESET);
Utils.blockThread(5);
}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<packaging>pom</packaging>

<properties>
<revision>2.4.28</revision>
<revision>2.4.29-SNAPSHOT</revision>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

Expand Down

0 comments on commit 0811e56

Please sign in to comment.