Fix crash on Paper

This commit is contained in:
GeorgH93 2024-05-09 13:57:23 +02:00
parent 212e1b207d
commit 0811e56b26
No known key found for this signature in database
GPG Key ID: D1630D37F9E4B3C8
2 changed files with 2 additions and 4 deletions

View File

@ -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);
}

View File

@ -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>