Updated Upstream (Bukkit/CraftBukkit)

Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
451bd74e Use gson for decoding version command

CraftBukkit Changes:
51100db8 SPIGOT-4678: Fix placing signs in certain circumstances
This commit is contained in:
Aikar 2019-03-24 12:33:39 -04:00
parent c5ef31cb0d
commit 458aa79f63
No known key found for this signature in database
GPG key ID: 401ADFC9891FAAFE
8 changed files with 46 additions and 43 deletions

View file

@ -1,26 +1,29 @@
From 1a30440641954b395935425e537a9b77857aacdc Mon Sep 17 00:00:00 2001
From 1bc123f10d8aefd48085360b80c7daee9945ec04 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 17:58:01 -0600
Subject: [PATCH] Check Paper versions
diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
index 0305548e..8e57aa91 100644
index b8126985d..73d258763 100644
--- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
@@ -28,6 +28,11 @@ import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
@@ -28,6 +28,14 @@ import java.util.concurrent.locks.ReentrantLock;
import org.jetbrains.annotations.NotNull;
+// Paper start
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import org.json.simple.JSONObject;
+import org.json.simple.parser.JSONParser;
+import org.json.simple.parser.ParseException;
+// Paper end
+
public class VersionCommand extends BukkitCommand {
public VersionCommand(@NotNull String name) {
super(name);
@@ -153,7 +158,7 @@ public class VersionCommand extends BukkitCommand {
@@ -153,7 +161,7 @@ public class VersionCommand extends BukkitCommand {
private void sendVersion(@NotNull CommandSender sender) {
if (hasVersion) {
@ -29,7 +32,7 @@ index 0305548e..8e57aa91 100644
lastCheck = System.currentTimeMillis();
hasVersion = false;
} else {
@@ -184,24 +189,28 @@ public class VersionCommand extends BukkitCommand {
@@ -184,24 +192,28 @@ public class VersionCommand extends BukkitCommand {
}
}
@ -70,7 +73,7 @@ index 0305548e..8e57aa91 100644
version = version.substring("git-Bukkit-".length());
int cbVersions = getDistance("craftbukkit", version.substring(0, version.indexOf(' ')));
if (cbVersions == -1) {
@@ -234,8 +243,16 @@ public class VersionCommand extends BukkitCommand {
@@ -234,8 +246,16 @@ public class VersionCommand extends BukkitCommand {
}
}
@ -88,7 +91,7 @@ index 0305548e..8e57aa91 100644
BufferedReader reader = Resources.asCharSource(
new URL("https://hub.spigotmc.org/stash/rest/api/1.0/projects/SPIGOT/repos/" + repo + "/commits?since=" + URLEncoder.encode(hash, "UTF-8") + "&withCounts=true"),
Charsets.UTF_8
@@ -249,9 +266,57 @@ public class VersionCommand extends BukkitCommand {
@@ -249,9 +269,57 @@ public class VersionCommand extends BukkitCommand {
} finally {
reader.close();
}

View file

@ -1,4 +1,4 @@
From 37e05486e349c20d73a9a695c8ddb4f4f2933425 Mon Sep 17 00:00:00 2001
From 919977c7f91757c5115ce0d257f4447480df1623 Mon Sep 17 00:00:00 2001
From: Kyle Wood <demonwav@gmail.com>
Date: Thu, 1 Mar 2018 19:37:52 -0600
Subject: [PATCH] Add version history to version command
@ -155,18 +155,18 @@ index 000000000..648b247ef
+ }
+}
diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
index 8e57aa911..746cedd87 100644
index 73d258763..ee07fe5e8 100644
--- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
@@ -31,6 +31,7 @@ import org.json.simple.parser.ParseException;
// Paper start
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
@@ -34,6 +34,7 @@ import java.net.HttpURLConnection;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
+import com.destroystokyo.paper.VersionHistoryManager;
// Paper end
public class VersionCommand extends BukkitCommand {
@@ -49,6 +50,7 @@ public class VersionCommand extends BukkitCommand {
@@ -52,6 +53,7 @@ public class VersionCommand extends BukkitCommand {
if (args.length == 0) {
sender.sendMessage("This server is running " + Bukkit.getName() + " version " + Bukkit.getVersion() + " (Implementing API version " + Bukkit.getBukkitVersion() + ")");
@ -174,7 +174,7 @@ index 8e57aa911..746cedd87 100644
sendVersion(sender);
} else {
StringBuilder name = new StringBuilder();
@@ -85,6 +87,22 @@ public class VersionCommand extends BukkitCommand {
@@ -88,6 +90,22 @@ public class VersionCommand extends BukkitCommand {
return true;
}