mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-27 19:47:42 +01:00
Correctly match release and non release versions of bukkit.
This commit is contained in:
parent
839ce3d526
commit
ee5e015a63
@ -124,7 +124,7 @@ public class Essentials extends JavaPlugin implements IEssentials
|
|||||||
LOGGER.log(Level.WARNING, _("versionMismatch", plugin.getDescription().getName()));
|
LOGGER.log(Level.WARNING, _("versionMismatch", plugin.getDescription().getName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
final Matcher versionMatch = Pattern.compile("git-Bukkit-([0-9]+).([0-9]+).([0-9]+)-R[0-9]+-b([0-9]+)jnks.*").matcher(getServer().getVersion());
|
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());
|
||||||
if (versionMatch.matches())
|
if (versionMatch.matches())
|
||||||
{
|
{
|
||||||
final int versionNumber = Integer.parseInt(versionMatch.group(4));
|
final int versionNumber = Integer.parseInt(versionMatch.group(4));
|
||||||
|
Loading…
Reference in New Issue
Block a user