mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
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
This commit is contained in:
parent
06e816fd71
commit
0a05b29148
8 changed files with 12 additions and 56 deletions
|
@ -926,15 +926,17 @@ diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||||
+++ b/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.command.CommandSender;
|
||||||
import org.bukkit.craftbukkit.LoggerOutputStream;
|
|
||||||
-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
||||||
+import co.aikar.timings.MinecraftTimings; // Paper
|
+import co.aikar.timings.MinecraftTimings; // Paper
|
||||||
import org.bukkit.event.server.ServerCommandEvent;
|
import org.bukkit.event.server.ServerCommandEvent;
|
||||||
import org.bukkit.craftbukkit.util.Waitable;
|
+import org.bukkit.craftbukkit.util.Waitable;
|
||||||
import org.bukkit.event.server.RemoteServerCommandEvent;
|
import org.bukkit.event.server.RemoteServerCommandEvent;
|
||||||
|
// CraftBukkit end
|
||||||
|
|
||||||
@@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
@@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,46 +0,0 @@
|
||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Minecrell <minecrell@minecrell.net>
|
|
||||||
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 @@
|
|
||||||
<version>2.8.1</version>
|
|
||||||
<scope>runtime</scope>
|
|
||||||
</dependency>
|
|
||||||
+ <dependency>
|
|
||||||
+ <groupId>org.apache.logging.log4j</groupId>
|
|
||||||
+ <artifactId>log4j-iostreams</artifactId>
|
|
||||||
+ <version>2.8.1</version>
|
|
||||||
+ </dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.ow2.asm</groupId>
|
|
||||||
<artifactId>asm</artifactId>
|
|
||||||
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);
|
|
|
@ -53,7 +53,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ <scope>runtime</scope>
|
+ <scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.ow2.asm</groupId>
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
@@ -0,0 +0,0 @@
|
@@ -0,0 +0,0 @@
|
||||||
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
|
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
|
||||||
<resource>META-INF/services/java.sql.Driver</resource>
|
<resource>META-INF/services/java.sql.Driver</resource>
|
||||||
|
@ -183,8 +183,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ */
|
+ */
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
|
|
||||||
System.setOut(new PrintStream(new LoggerOutputStream(logger, Level.INFO), true));
|
System.setOut(IoBuilder.forLogger(logger).setLevel(Level.INFO).buildPrintStream());
|
||||||
System.setErr(new PrintStream(new LoggerOutputStream(logger, Level.WARN), true));
|
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
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
|
|
|
@ -9,8 +9,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
--- a/pom.xml
|
--- a/pom.xml
|
||||||
+++ b/pom.xml
|
+++ b/pom.xml
|
||||||
@@ -0,0 +0,0 @@
|
@@ -0,0 +0,0 @@
|
||||||
<artifactId>log4j-iostreams</artifactId>
|
|
||||||
<version>2.8.1</version>
|
<version>2.8.1</version>
|
||||||
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
+ <!-- Paper - Async loggers -->
|
+ <!-- Paper - Async loggers -->
|
||||||
+ <dependency>
|
+ <dependency>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 6f55306c444c3356c4ae394dd708a97451b06fa2
|
Subproject commit d5a72960028deccea210ec9883403fd01e37b09e
|
|
@ -1 +1 @@
|
||||||
Subproject commit 3a70bd92b96d836dd046576a57deb7c8573c88a7
|
Subproject commit 2740d5aebd99bc6b79dc65e2491ae1fd85b64480
|
Loading…
Reference in a new issue