aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorZach Brown <[email protected]>2016-02-15 08:31:45 -0600
committerZach Brown <[email protected]>2016-02-15 08:31:45 -0600
commit577418ea75dbd7970beceba4a2bba99a76173313 (patch)
treebc87e28242792a1ab76fcd53547c4bbece9ee9f3
parent29616a64bb76b26b3a933060ab333db3e11d6da5 (diff)
downloadPaper-577418ea75dbd7970beceba4a2bba99a76173313.tar.gz
Paper-577418ea75dbd7970beceba4a2bba99a76173313.zip
Ignore version formatting errors
We have so many random strings around at the moment this will be better for now
-rw-r--r--Spigot-API-Patches/0008-Check-PaperSpigot-versions.patch10
1 files changed, 6 insertions, 4 deletions
diff --git a/Spigot-API-Patches/0008-Check-PaperSpigot-versions.patch b/Spigot-API-Patches/0008-Check-PaperSpigot-versions.patch
index 30c2b8f6a7..11ba5f103a 100644
--- a/Spigot-API-Patches/0008-Check-PaperSpigot-versions.patch
+++ b/Spigot-API-Patches/0008-Check-PaperSpigot-versions.patch
@@ -1,11 +1,11 @@
-From 9515fddcb7392076601abb157235deb36daaaafe Mon Sep 17 00:00:00 2001
+From 386d76f2e47c4d3e3b824d6ec2c25d914fbe6e2c Mon Sep 17 00:00:00 2001
From: Zach Brown <[email protected]>
Date: Sun, 28 Dec 2014 16:28:21 -0600
Subject: [PATCH] Check PaperSpigot versions
diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
-index b55abdb..cf651fc 100644
+index b55abdb..e91e1d8 100644
--- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
@@ -185,7 +185,21 @@ public class VersionCommand extends BukkitCommand {
@@ -31,7 +31,7 @@ index b55abdb..cf651fc 100644
String[] parts = version.substring("git-Spigot-".length()).split("-");
int cbVersions = getDistance("craftbukkit", parts[1].substring(0, parts[1].indexOf(' ')));
int spigotVersions = getDistance("spigot", parts[0]);
-@@ -232,16 +246,19 @@ public class VersionCommand extends BukkitCommand {
+@@ -232,17 +246,20 @@ public class VersionCommand extends BukkitCommand {
}
}
@@ -47,15 +47,17 @@ index b55abdb..cf651fc 100644
- 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();
--
2.7.1