mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-02-01 04:11:23 +01:00
Adjust parsing of version.
This commit is contained in:
parent
2e9ae3aa83
commit
68e4d84a85
@ -261,7 +261,8 @@ public class NoCheatPlus extends JavaPlugin implements Listener {
|
|||||||
BufferedReader bufferedReader = null;
|
BufferedReader bufferedReader = null;
|
||||||
updateAvailable = false;
|
updateAvailable = false;
|
||||||
try {
|
try {
|
||||||
final int currentVersion = Integer.parseInt(getDescription().getVersion().split("-b")[1]);
|
final String[] split = getDescription().getVersion().split("-b");
|
||||||
|
final int currentVersion = Integer.parseInt(split[split.length - 1]);
|
||||||
final URL url = new URL("http://nocheatplus.org:8080/job/NoCheatPlus/lastSuccessfulBuild/api/json");
|
final URL url = new URL("http://nocheatplus.org:8080/job/NoCheatPlus/lastSuccessfulBuild/api/json");
|
||||||
final URLConnection connection = url.openConnection();
|
final URLConnection connection = url.openConnection();
|
||||||
connection.setReadTimeout(config.getInt(ConfPaths.MISCELLANEOUS_READTIMEOUT, 4) * 1000);
|
connection.setReadTimeout(config.getInt(ConfPaths.MISCELLANEOUS_READTIMEOUT, 4) * 1000);
|
||||||
|
Loading…
Reference in New Issue
Block a user