Skip to content

Instantly share code, notes, and snippets.

@nijikokun
Created June 5, 2011 18:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nijikokun/1009266 to your computer and use it in GitHub Desktop.
Save nijikokun/1009266 to your computer and use it in GitHub Desktop.
Get Craftbukkit Version
public static String getCraftBukkitVersion(String version) {
Pattern v = Pattern.compile("b(\\d{1,4})");
String vr = "";
Matcher m = v.matcher(version);
while (m.find()) {
vr = m.group();
}
if(vr.startsWith("b"))
vr = vr.substring(1);
return vr;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment