mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-01-31 20:01:25 +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;
|
||||
updateAvailable = false;
|
||||
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 URLConnection connection = url.openConnection();
|
||||
connection.setReadTimeout(config.getInt(ConfPaths.MISCELLANEOUS_READTIMEOUT, 4) * 1000);
|
||||
|
Loading…
Reference in New Issue
Block a user