make update checker treat snapshot versions as 1 lower than a full release
This commit is contained in:
parent
e496d00fcd
commit
9d2489e84c
1 changed files with 3 additions and 1 deletions
|
@ -41,7 +41,9 @@ public class UpdateChecker extends BukkitRunnable {
|
||||||
}
|
}
|
||||||
|
|
||||||
private int versionToNumber(String version) {
|
private int versionToNumber(String version) {
|
||||||
return Integer.parseInt(version.replaceAll("[^0-9]", ""));
|
int num = Integer.parseInt(version.replaceAll("[^0-9]", ""));
|
||||||
|
if (version.toLowerCase().contains("snapshot")) num -= 1;
|
||||||
|
return num;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Status getStatus() {
|
public Status getStatus() {
|
||||||
|
|
Loading…
Reference in a new issue