Merge remote-tracking branch 'origin/master'

This commit is contained in:
MattBDev 2016-05-20 20:29:32 -04:00
commit b51d659ff9

View File

@ -152,8 +152,8 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain
@Override @Override
public int[] getPluginVersion() { public int[] getPluginVersion() {
String ver = getDescription().getVersion(); String ver = getDescription().getVersion();
if (ver.contains("-SNAPSHOT")) { if (ver.contains("-")) {
ver = ver.split("-SNAPSHOT")[0]; ver = ver.split("-")[0];
} }
String[] split = ver.split("\\."); String[] split = ver.split("\\.");
return new int[]{Integer.parseInt(split[0]), Integer.parseInt(split[1]), Integer.parseInt(split[2])}; return new int[]{Integer.parseInt(split[0]), Integer.parseInt(split[1]), Integer.parseInt(split[2])};