make update checker treat snapshot versions as 1 lower than a full release

This commit is contained in:
Pyrbu 2023-06-19 21:48:25 +02:00
parent e496d00fcd
commit 9d2489e84c

@ -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() {