mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-24 01:57:58 +01:00
Fix version matching.
This commit is contained in:
parent
dae69622a5
commit
b0552019f5
@ -129,10 +129,10 @@ public class Essentials extends JavaPlugin implements IEssentials
|
||||
LOGGER.log(Level.WARNING, _("versionMismatch", plugin.getDescription().getName()));
|
||||
}
|
||||
}
|
||||
final Matcher versionMatch = Pattern.compile("git-Bukkit-([0-9]+).([0-9]+).([0-9]+)-R[0-9]+-(?:[0-9]+-g[0-9a-f]+-)?b([0-9]+)jnks.*").matcher(getServer().getVersion());
|
||||
final Matcher versionMatch = Pattern.compile("git-Bukkit-(?:(?:[0-9]+)\\.)+[0-9]+-R[0-9]+-(?:[0-9]+-g[0-9a-f]+-)?b([0-9]+)jnks.*").matcher(getServer().getVersion());
|
||||
if (versionMatch.matches())
|
||||
{
|
||||
final int versionNumber = Integer.parseInt(versionMatch.group(4));
|
||||
final int versionNumber = Integer.parseInt(versionMatch.group(1));
|
||||
if (versionNumber < BUKKIT_VERSION)
|
||||
{
|
||||
LOGGER.log(Level.SEVERE, _("notRecommendedBukkit"));
|
||||
|
Loading…
Reference in New Issue
Block a user