Simplified regex when parsing server version

This commit is contained in:
Intelli 2021-07-26 17:56:30 -06:00
parent f6f9c27f08
commit 3c82dc337a

View File

@ -127,7 +127,7 @@ public final class CoreProtect extends JavaPlugin {
private static boolean performVersionChecks() {
try {
String[] bukkitVersion = Bukkit.getServer().getBukkitVersion().split("-|\\.");
String[] bukkitVersion = Bukkit.getServer().getBukkitVersion().split("[-.]");
if (Util.newVersion(bukkitVersion[0] + "." + bukkitVersion[1], ConfigHandler.SPIGOT_VERSION)) {
Chat.console(Phrase.build(Phrase.VERSION_REQUIRED, "Spigot", ConfigHandler.SPIGOT_VERSION));
return false;