From 0a05b29148f6adb6182841b991a9839fa292e274 Mon Sep 17 00:00:00 2001 From: Mariell Date: Sat, 12 Sep 2020 21:57:21 +0200 Subject: [PATCH] Updated Upstream (CraftBukkit/Spigot) (#4318) 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 CraftBukkit Changes: d5a72960 SPIGOT-6063: ConsoleSender sending extra lines in Java 13+ Spigot Changes: 2740d5ae Rebuild patches --- ...support.patch => 0552-Brand-support.patch} | 0 ...support.patch => 0562-Brand-support.patch} | 0 Spigot-Server-Patches/Timings-v2.patch | 10 ++-- ...ams-to-redirect-System.out-err-to-lo.patch | 46 ------------------- ...oleAppender-for-console-improvements.patch | 6 +-- .../Use-asynchronous-Log4j-2-loggers.patch | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 8 files changed, 12 insertions(+), 56 deletions(-) rename Spigot-Server-Patches/{0553-Brand-support.patch => 0552-Brand-support.patch} (100%) rename Spigot-Server-Patches/{0563-Brand-support.patch => 0562-Brand-support.patch} (100%) delete mode 100644 Spigot-Server-Patches/Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch diff --git a/Spigot-Server-Patches/0553-Brand-support.patch b/Spigot-Server-Patches/0552-Brand-support.patch similarity index 100% rename from Spigot-Server-Patches/0553-Brand-support.patch rename to Spigot-Server-Patches/0552-Brand-support.patch diff --git a/Spigot-Server-Patches/0563-Brand-support.patch b/Spigot-Server-Patches/0562-Brand-support.patch similarity index 100% rename from Spigot-Server-Patches/0563-Brand-support.patch rename to Spigot-Server-Patches/0562-Brand-support.patch diff --git a/Spigot-Server-Patches/Timings-v2.patch b/Spigot-Server-Patches/Timings-v2.patch index 356ea896bb..8f83f210c3 100644 --- a/Spigot-Server-Patches/Timings-v2.patch +++ b/Spigot-Server-Patches/Timings-v2.patch @@ -926,15 +926,17 @@ diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/ index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java -@@ -0,0 +0,0 @@ import org.apache.logging.log4j.Level; - +@@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger; + import org.apache.logging.log4j.Level; + import org.apache.logging.log4j.io.IoBuilder; import org.bukkit.command.CommandSender; - import org.bukkit.craftbukkit.LoggerOutputStream; -import org.bukkit.craftbukkit.SpigotTimings; // Spigot +import co.aikar.timings.MinecraftTimings; // Paper import org.bukkit.event.server.ServerCommandEvent; - import org.bukkit.craftbukkit.util.Waitable; ++import org.bukkit.craftbukkit.util.Waitable; import org.bukkit.event.server.RemoteServerCommandEvent; + // CraftBukkit end + @@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer } diff --git a/Spigot-Server-Patches/Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch b/Spigot-Server-Patches/Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch deleted file mode 100644 index 0977a63e4d..0000000000 --- a/Spigot-Server-Patches/Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Minecrell -Date: Mon, 18 Sep 2017 12:00:03 +0200 -Subject: [PATCH] Use Log4j IOStreams to redirect System.out/err to logger - -Log4j2 provides an optimized implementation of PrintStream that -redirects its output to a logger. Use it instead of a custom -implementation for minor performance improvements and some fixes. - -With the old implementation, each call to System.print() -results in a separate line, even though it should not result in -a line break. Log4j's implementation handles it correctly. - -diff --git a/pom.xml b/pom.xml -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -0,0 +0,0 @@ - 2.8.1 - runtime - -+ -+ org.apache.logging.log4j -+ log4j-iostreams -+ 2.8.1 -+ - - org.ow2.asm - asm -diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/server/DedicatedServer.java -+++ b/src/main/java/net/minecraft/server/DedicatedServer.java -@@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer - */ - // Paper end - -- System.setOut(new PrintStream(new LoggerOutputStream(logger, Level.INFO), true)); -- System.setErr(new PrintStream(new LoggerOutputStream(logger, Level.WARN), true)); -+ // Paper start - Use Log4j IOStreams -+ System.setOut(org.apache.logging.log4j.io.IoBuilder.forLogger(logger).setLevel(Level.INFO).buildPrintStream()); -+ System.setErr(org.apache.logging.log4j.io.IoBuilder.forLogger(logger).setLevel(Level.WARN).buildPrintStream()); -+ // Paper end - // CraftBukkit end - - thread.setDaemon(true); diff --git a/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch b/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch index c1be3d8be3..c1623662fe 100644 --- a/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch @@ -53,7 +53,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + runtime - org.ow2.asm + org.apache.logging.log4j @@ -0,0 +0,0 @@ META-INF/services/java.sql.Driver @@ -183,8 +183,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + */ + // Paper end - System.setOut(new PrintStream(new LoggerOutputStream(logger, Level.INFO), true)); - System.setErr(new PrintStream(new LoggerOutputStream(logger, Level.WARN), true)); + System.setOut(IoBuilder.forLogger(logger).setLevel(Level.INFO).buildPrintStream()); + System.setErr(IoBuilder.forLogger(logger).setLevel(Level.WARN).buildPrintStream()); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/Spigot-Server-Patches/Use-asynchronous-Log4j-2-loggers.patch b/Spigot-Server-Patches/Use-asynchronous-Log4j-2-loggers.patch index 90e4ba55d9..8b8f90c601 100644 --- a/Spigot-Server-Patches/Use-asynchronous-Log4j-2-loggers.patch +++ b/Spigot-Server-Patches/Use-asynchronous-Log4j-2-loggers.patch @@ -9,8 +9,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ - log4j-iostreams 2.8.1 + compile + + diff --git a/work/CraftBukkit b/work/CraftBukkit index 6f55306c44..d5a7296002 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 6f55306c444c3356c4ae394dd708a97451b06fa2 +Subproject commit d5a72960028deccea210ec9883403fd01e37b09e diff --git a/work/Spigot b/work/Spigot index 3a70bd92b9..2740d5aebd 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 3a70bd92b96d836dd046576a57deb7c8573c88a7 +Subproject commit 2740d5aebd99bc6b79dc65e2491ae1fd85b64480