Ignore version formatting errors

We have so many random strings around at the moment this will be better for now
This commit is contained in:
Zach Brown 2016-02-15 08:31:45 -06:00
parent eedfd912d2
commit 1a1422fd41

View File

@ -47,13 +47,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- JSONObject obj = (JSONObject) new JSONParser().parse(reader);
- return ((Number) obj.get("totalCount")).intValue();
- } catch (ParseException ex) {
- ex.printStackTrace();
+ // PaperSpigot start
+ int newVer = Integer.decode(reader.readLine());
+ int currentVer = Integer.decode(currentVerInt);
+ return newVer - currentVer;
+ } catch (NumberFormatException ex) {
+ //ex.printStackTrace();
+ // PaperSpigot end
ex.printStackTrace();
return -1;
} finally {
reader.close();
--