mirror of
https://github.com/PlayPro/CoreProtect.git
synced 2024-11-28 12:55:34 +01:00
Simplified regex when parsing server version
This commit is contained in:
parent
f6f9c27f08
commit
3c82dc337a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user