mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-09 08:32:07 -07:00
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:
@@ -47,13 +47,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
- JSONObject obj = (JSONObject) new JSONParser().parse(reader);
|
- JSONObject obj = (JSONObject) new JSONParser().parse(reader);
|
||||||
- return ((Number) obj.get("totalCount")).intValue();
|
- return ((Number) obj.get("totalCount")).intValue();
|
||||||
- } catch (ParseException ex) {
|
- } catch (ParseException ex) {
|
||||||
|
- ex.printStackTrace();
|
||||||
+ // PaperSpigot start
|
+ // PaperSpigot start
|
||||||
+ int newVer = Integer.decode(reader.readLine());
|
+ int newVer = Integer.decode(reader.readLine());
|
||||||
+ int currentVer = Integer.decode(currentVerInt);
|
+ int currentVer = Integer.decode(currentVerInt);
|
||||||
+ return newVer - currentVer;
|
+ return newVer - currentVer;
|
||||||
+ } catch (NumberFormatException ex) {
|
+ } catch (NumberFormatException ex) {
|
||||||
|
+ //ex.printStackTrace();
|
||||||
+ // PaperSpigot end
|
+ // PaperSpigot end
|
||||||
ex.printStackTrace();
|
|
||||||
return -1;
|
return -1;
|
||||||
} finally {
|
} finally {
|
||||||
|
reader.close();
|
||||||
--
|
--
|
Reference in New Issue
Block a user