summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2012-03-01 21:47:01 +0000
committerKHobbits <rob@khobbits.co.uk>2012-03-01 21:47:01 +0000
commitb0552019f53df8d76f051ceca26120ae1e524abf (patch)
treea090f5f8c9772ff2524b0cba2c7d227c0ec9c25b
parentdae69622a587ba929fdc0ee6c204484de2308ae6 (diff)
downloadEssentials-b0552019f53df8d76f051ceca26120ae1e524abf.tar
Essentials-b0552019f53df8d76f051ceca26120ae1e524abf.tar.gz
Essentials-b0552019f53df8d76f051ceca26120ae1e524abf.tar.lz
Essentials-b0552019f53df8d76f051ceca26120ae1e524abf.tar.xz
Essentials-b0552019f53df8d76f051ceca26120ae1e524abf.zip
Fix version matching.
-rw-r--r--Essentials/src/com/earth2me/essentials/Essentials.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java
index f480d9e8f..24ac0ad6e 100644
--- a/Essentials/src/com/earth2me/essentials/Essentials.java
+++ b/Essentials/src/com/earth2me/essentials/Essentials.java
@@ -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"));