summaryrefslogtreecommitdiffstats
path: root/EssentialsUpdate/src/com/earth2me
diff options
context:
space:
mode:
authorementalo <ementalodev@gmx.co.uk>2012-06-26 11:36:54 +0100
committerementalo <ementalodev@gmx.co.uk>2012-06-26 11:36:54 +0100
commitd1dad4fca529221bfd8fb42dcc12714f86177eed (patch)
treea2e6bd2a63a3d0dbc8d8d7796352edad26c84755 /EssentialsUpdate/src/com/earth2me
parent451abd2bec45ae5601b8db1234ea308066937a32 (diff)
downloadEssentials-d1dad4fca529221bfd8fb42dcc12714f86177eed.tar
Essentials-d1dad4fca529221bfd8fb42dcc12714f86177eed.tar.gz
Essentials-d1dad4fca529221bfd8fb42dcc12714f86177eed.tar.lz
Essentials-d1dad4fca529221bfd8fb42dcc12714f86177eed.tar.xz
Essentials-d1dad4fca529221bfd8fb42dcc12714f86177eed.zip
change pattern match for essentials update
Diffstat (limited to 'EssentialsUpdate/src/com/earth2me')
-rw-r--r--EssentialsUpdate/src/com/earth2me/essentials/update/UpdateCheck.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateCheck.java b/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateCheck.java
index 29afc4d3f..98426ce58 100644
--- a/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateCheck.java
+++ b/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateCheck.java
@@ -187,10 +187,10 @@ public class UpdateCheck
private int getBukkitVersion()
{
- final Matcher versionMatch = Pattern.compile("git-Bukkit-([0-9]+).([0-9]+).([0-9]+)-[0-9]+-[0-9a-z]+-b([0-9]+)jnks.*").matcher(plugin.getServer().getVersion());
- if (versionMatch.matches())
+ 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(plugin.getServer().getVersion());
+ if (versionMatch.matches())
{
- return Integer.parseInt(versionMatch.group(4));
+ return Integer.parseInt(versionMatch.group(1));
}
throw new NumberFormatException("Bukkit Version changed!");
}