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:
Mariell 2020-09-12 21:57:21 +02:00 committed by GitHub
parent fb71c71c80
commit a0b8b886c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
431 changed files with 103 additions and 147 deletions

View file

@ -5,7 +5,7 @@ Subject: [PATCH] POM Changes
diff --git a/pom.xml b/pom.xml
index 4bb337765331da509dd00ddebfaae5cb2b52db65..78c26572ab2ecdd554da38898f1c6c60e13e769c 100644
index 1374fe3d7007977cf7513a7a91b4509dfc881e65..e954b100ea0c038c2e2aaba2a0937a6a9ef81f3d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,15 +1,14 @@
@ -61,7 +61,7 @@ index 4bb337765331da509dd00ddebfaae5cb2b52db65..78c26572ab2ecdd554da38898f1c6c60
<artifactId>minecraft-server</artifactId>
<version>${minecraft.version}-SNAPSHOT</version>
<scope>compile</scope>
@@ -50,6 +55,17 @@
@@ -56,6 +61,17 @@
<version>8.0.1</version>
<scope>compile</scope>
</dependency>
@ -79,7 +79,7 @@ index 4bb337765331da509dd00ddebfaae5cb2b52db65..78c26572ab2ecdd554da38898f1c6c60
<!-- deprecated API depend -->
<dependency>
<groupId>com.googlecode.json-simple</groupId>
@@ -106,34 +122,22 @@
@@ -112,34 +128,22 @@
<!-- This builds a completely 'ready to start' jar with all dependencies inside -->
<build>
@ -125,7 +125,7 @@ index 4bb337765331da509dd00ddebfaae5cb2b52db65..78c26572ab2ecdd554da38898f1c6c60
</goals>
</execution>
</executions>
@@ -143,6 +147,7 @@
@@ -149,6 +153,7 @@
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
@ -133,7 +133,7 @@ index 4bb337765331da509dd00ddebfaae5cb2b52db65..78c26572ab2ecdd554da38898f1c6c60
<archive>
<manifest>
<addDefaultEntries>false</addDefaultEntries>
@@ -150,8 +155,9 @@
@@ -156,8 +161,9 @@
<manifestEntries>
<Main-Class>org.bukkit.craftbukkit.Main</Main-Class>
<Implementation-Title>CraftBukkit</Implementation-Title>
@ -145,7 +145,7 @@ index 4bb337765331da509dd00ddebfaae5cb2b52db65..78c26572ab2ecdd554da38898f1c6c60
<Specification-Title>Bukkit</Specification-Title>
<Specification-Version>${api.version}</Specification-Version>
<Specification-Vendor>Bukkit Team</Specification-Vendor>
@@ -190,6 +196,7 @@
@@ -196,6 +202,7 @@
<goal>shade</goal>
</goals>
<configuration>
@ -153,7 +153,7 @@ index 4bb337765331da509dd00ddebfaae5cb2b52db65..78c26572ab2ecdd554da38898f1c6c60
<createSourcesJar>${shadeSourcesJar}</createSourcesJar>
<filters>
<filter>
@@ -198,6 +205,14 @@
@@ -204,6 +211,14 @@
<exclude>com/google/common/**</exclude>
<exclude>com/google/gson/**</exclude>
<exclude>com/google/thirdparty/**</exclude>
@ -168,7 +168,7 @@ index 4bb337765331da509dd00ddebfaae5cb2b52db65..78c26572ab2ecdd554da38898f1c6c60
</excludes>
</filter>
</filters>
@@ -213,10 +228,11 @@
@@ -219,10 +234,11 @@
<pattern>jline</pattern>
<shadedPattern>org.bukkit.craftbukkit.libs.jline</shadedPattern>
</relocation>
@ -184,7 +184,7 @@ index 4bb337765331da509dd00ddebfaae5cb2b52db65..78c26572ab2ecdd554da38898f1c6c60
<relocation>
<pattern>org.apache.commons.codec</pattern>
<shadedPattern>org.bukkit.craftbukkit.libs.org.apache.commons.codec</shadedPattern>
@@ -258,10 +274,6 @@
@@ -264,10 +280,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>

View file

@ -556,10 +556,10 @@ index f6335ed3eba55e939aa24b1eeb83026e61d92235..94b8cda9ce78aa22c14e88f3500bb981
}
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 94a41f3f9ca90f28aefdecc38db0b853f983baf1..a48d17b18414aed3987041705615464bbe064d89 100644
index 87045e72d097a4eb006654ea41f58ac803bbab3e..468d0cce2208bc21ec3d62590ac6e050a2037518 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -148,6 +148,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -145,6 +145,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
org.spigotmc.SpigotConfig.init((java.io.File) options.valueOf("spigot-settings"));
org.spigotmc.SpigotConfig.registerCommands();
// Spigot end

View file

@ -4190,7 +4190,7 @@ index 43168f3836eb8823f3b2046882664ba45f1be678..127c03c321e1414e0d174c8d81a7851c
@Override
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 4791b59fc2740bdc81b62748d3edbf2b2a83e043..c7a7e2cf54b4ca7fd65fca63c0f102f479a0f3e5 100644
index 46d33c6f548f1cf0b863e2e67d46aa5e905103f3..c455d0b2dc806d7c26235e6c89c58311548177ec 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -67,9 +67,9 @@ public class PlayerConnection implements PacketListenerPlayIn {

View file

@ -923,19 +923,21 @@ index 11891990d90b789192d9081787c1e844646121ae..2a48d85f0490991eb323ef550cb6148d
int k = 0;
CustomFunction.c[] acustomfunction_c = customfunction.b();
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index a48d17b18414aed3987041705615464bbe064d89..c9da9af05377a996048418c1bcb0b2f04c819d3a 100644
index 468d0cce2208bc21ec3d62590ac6e050a2037518..b5d1dbf889138699c877f13382557ce377e70e72 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -28,7 +28,7 @@ import org.apache.logging.log4j.Level;
@@ -26,8 +26,9 @@ 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;
@@ -379,7 +379,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
// CraftBukkit end
@@ -376,7 +377,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
}
public void handleCommandQueue() {
@ -944,7 +946,7 @@ index a48d17b18414aed3987041705615464bbe064d89..c9da9af05377a996048418c1bcb0b2f0
while (!this.serverCommandQueue.isEmpty()) {
ServerCommand servercommand = (ServerCommand) this.serverCommandQueue.remove(0);
@@ -394,7 +394,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -391,7 +392,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
// CraftBukkit end
}
@ -953,7 +955,7 @@ index a48d17b18414aed3987041705615464bbe064d89..c9da9af05377a996048418c1bcb0b2f0
}
@Override
@@ -630,6 +630,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -627,6 +628,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@Override
public String executeRemoteCommand(String s) {
@ -961,7 +963,7 @@ index a48d17b18414aed3987041705615464bbe064d89..c9da9af05377a996048418c1bcb0b2f0
this.remoteControlCommandListener.clearMessages();
this.executeSync(() -> {
// CraftBukkit start - fire RemoteServerCommandEvent
@@ -638,10 +639,39 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -635,10 +637,39 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
if (event.isCancelled()) {
return;
}
@ -1457,7 +1459,7 @@ index 127c03c321e1414e0d174c8d81a7851c9da03574..d98b6ef44e1836920956754dfcb6654f
protected void broadcast(Entity entity, Packet<?> packet) {
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index c7a7e2cf54b4ca7fd65fca63c0f102f479a0f3e5..89c36a5ad2a74a2bf4c86ad108a43e97fa88e793 100644
index c455d0b2dc806d7c26235e6c89c58311548177ec..fd1860e3a83dec60362997ac6e1225270260cf38 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -58,6 +58,7 @@ import org.bukkit.inventory.CraftingInventory;

View file

@ -192,10 +192,10 @@ index 0000000000000000000000000000000000000000..aac3f66cb23d260729c2a48d8710a9de
+ }
+}
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index c9da9af05377a996048418c1bcb0b2f04c819d3a..ef226a9a9e1fbd729cf6349eb3ff63bf4b4a2d08 100644
index 5f49ab337ffb02b2d77f1722a30821564f86657a..aade5e291b80c5362c8fd8cf09faca8e631e0554 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -156,6 +156,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -154,6 +154,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
return false;
}
com.destroystokyo.paper.PaperConfig.registerCommands();

View file

@ -14,7 +14,7 @@ big slowdown in execution but throwing an exception at same time to raise awaren
that it is happening so that plugin authors can fix their code to stop executing commands async.
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 89c36a5ad2a74a2bf4c86ad108a43e97fa88e793..090bce8c24e08c0af6f71d64568514f2c9675aa5 100644
index fd1860e3a83dec60362997ac6e1225270260cf38..7493d7ce48a9c5875bce01252b4d958ab3b9ec7d 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1609,6 +1609,29 @@ public class PlayerConnection implements PacketListenerPlayIn {

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Complete resource pack API
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 090bce8c24e08c0af6f71d64568514f2c9675aa5..c3f2575fb40e82ee4b70301b7655698388b6ae05 100644
index 7493d7ce48a9c5875bce01252b4d958ab3b9ec7d..535e24a54a22f59b165e5043653eef5ca8f0d5e0 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1375,7 +1375,11 @@ public class PlayerConnection implements PacketListenerPlayIn {

View file

@ -18,7 +18,7 @@ index 49c911e54eb3b20d820f3e1895c057eead6d312b..09c757a3bb1d9a49343cf58e18f736e1
private Vec3D c;
private EnumHand d;
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index c3f2575fb40e82ee4b70301b7655698388b6ae05..28febcc22bc931e4e89f274275853ceaeab9ce0a 100644
index 535e24a54a22f59b165e5043653eef5ca8f0d5e0..7afb8b6ec1cc52d7dae77afab44f8f47bc30fa57 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1950,6 +1950,16 @@ public class PlayerConnection implements PacketListenerPlayIn {

View file

@ -26,7 +26,7 @@ index fe2c8001897dc6d66ce0d24ddb1a5d3b79810294..538e6751f3bda77ba32256158d2a6a25
+ }
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 28febcc22bc931e4e89f274275853ceaeab9ce0a..6a9b673929a934e37d2abb83cc8efcb91f1fd92a 100644
index 7afb8b6ec1cc52d7dae77afab44f8f47bc30fa57..575825af6500bb7be669fec700a4ccd8f95dd90e 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1687,7 +1687,16 @@ public class PlayerConnection implements PacketListenerPlayIn {

View file

@ -10,10 +10,10 @@ Additionally, move Saving of the User cache to be done async, incase
the user never changed the default setting for Spigot's save on stop only.
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index ef226a9a9e1fbd729cf6349eb3ff63bf4b4a2d08..5745c6aa86a0411be8bc49ff8e9dd655e91fd68e 100644
index aade5e291b80c5362c8fd8cf09faca8e631e0554..2d74d14385c7e705cb210bcfc0780f4c9c6a1cda 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -212,7 +212,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -210,7 +210,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
}
if (this.convertNames()) {

View file

@ -23,7 +23,7 @@ index 5827ef1e3eb35a11867ee4f92f301e1b0245c0fa..23c9e0f317073bb9c327ec49e0b0586d
+ }
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 6a9b673929a934e37d2abb83cc8efcb91f1fd92a..146dd4dd194a79a5c99218cc776c46ed83f63dc1 100644
index 575825af6500bb7be669fec700a4ccd8f95dd90e..fe1a6b5b2a432805830e651be5f98fc4709b8883 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1235,13 +1235,14 @@ public class PlayerConnection implements PacketListenerPlayIn {

View file

@ -21,7 +21,7 @@ index 23c9e0f317073bb9c327ec49e0b0586d2123e4e9..c4086de778cc2ccc958b1a94dd6e9cdb
+ }
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 146dd4dd194a79a5c99218cc776c46ed83f63dc1..f31d8d8253ddcde645b805dd809e0a0c39403c8b 100644
index fe1a6b5b2a432805830e651be5f98fc4709b8883..2f5ffd261208f726b4eedb5ac2830162741fcb43 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -147,7 +147,7 @@ public class PlayerConnection implements PacketListenerPlayIn {

View file

@ -19,7 +19,7 @@ index 9d0af9bcdc91996d09db9472fca6682368091efa..3d4ae2f7e6dbc10f38329d89027eea9c
@Override
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index f31d8d8253ddcde645b805dd809e0a0c39403c8b..cadeb30ef8f31fcc0d626c2cc7f079c3e778704d 100644
index 2f5ffd261208f726b4eedb5ac2830162741fcb43..c98766717dc45539227cf2a2ab7efd2f8faa5c4a 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2564,7 +2564,7 @@ public class PlayerConnection implements PacketListenerPlayIn {

View file

@ -239,7 +239,7 @@ index c830b3c2145effc16314c6216be8af935416cb58..f1a509063c09e603140c74255a3fb901
}
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
index 136bb85aace4efc34e1fe804bbccc78bf7495b41..ee59d76d31b8b8cfd39d612b1e6040891f2256f4 100644
index 1ebc0fcca6d22e0d6f4d8dac0b305a00437c82b2..d9ee5f7fd6a405547da0b162f11886d7b96dd622 100644
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
@@ -377,7 +377,7 @@ public class PlayerInteractManager {

View file

@ -39,7 +39,7 @@ index 485b69140f72a22b3eae53be74bcad003dd92e8f..196d1a7fa8ac9249ca061a704b2403c7
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index cadeb30ef8f31fcc0d626c2cc7f079c3e778704d..bc084ade77cff987c41d148ce85fc61d6efb5feb 100644
index c98766717dc45539227cf2a2ab7efd2f8faa5c4a..29b620bce44e3508dd7870347df4bbf02cef2662 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1812,6 +1812,13 @@ public class PlayerConnection implements PacketListenerPlayIn {

View file

@ -19,7 +19,7 @@ Other changes:
configuration
diff --git a/pom.xml b/pom.xml
index 78c26572ab2ecdd554da38898f1c6c60e13e769c..a1b4f01782c896347c821af93606ed5d3b501c8d 100644
index e954b100ea0c038c2e2aaba2a0937a6a9ef81f3d..2781d908fc9fcaa902fff1f86e7dffd86bd4c772 100644
--- a/pom.xml
+++ b/pom.xml
@@ -44,10 +44,27 @@
@ -53,8 +53,8 @@ index 78c26572ab2ecdd554da38898f1c6c60e13e769c..a1b4f01782c896347c821af93606ed5d
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
@@ -265,10 +282,18 @@
<groupId>org.apache.logging.log4j</groupId>
@@ -271,10 +288,18 @@
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/services/java.sql.Driver</resource>
</transformer>
@ -144,10 +144,10 @@ index 0000000000000000000000000000000000000000..685deaa0e5d1ddc13e3a7c0471b1cfcf
+
+}
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 5745c6aa86a0411be8bc49ff8e9dd655e91fd68e..6e19b41f41137de8379eb6e0c8650441445e0f2e 100644
index 2d74d14385c7e705cb210bcfc0780f4c9c6a1cda..4b5da3bf52dc55b7da3109da42c190d4e0d55e36 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -62,6 +62,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -60,6 +60,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
if (!org.bukkit.craftbukkit.Main.useConsole) {
return;
}
@ -157,7 +157,7 @@ index 5745c6aa86a0411be8bc49ff8e9dd655e91fd68e..6e19b41f41137de8379eb6e0c8650441
jline.console.ConsoleReader bufferedreader = reader;
// MC-33041, SPIGOT-5538: if System.in is not valid due to javaw, then return
@@ -101,6 +104,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -99,6 +102,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
DedicatedServer.LOGGER.error("Exception handling console input", ioexception);
}
@ -166,7 +166,7 @@ index 5745c6aa86a0411be8bc49ff8e9dd655e91fd68e..6e19b41f41137de8379eb6e0c8650441
}
};
@@ -112,6 +117,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -110,6 +115,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
}
global.addHandler(new org.bukkit.craftbukkit.util.ForwardLogHandler());
@ -176,15 +176,15 @@ index 5745c6aa86a0411be8bc49ff8e9dd655e91fd68e..6e19b41f41137de8379eb6e0c8650441
final org.apache.logging.log4j.core.Logger logger = ((org.apache.logging.log4j.core.Logger) LogManager.getRootLogger());
for (org.apache.logging.log4j.core.Appender appender : logger.getAppenders().values()) {
if (appender instanceof org.apache.logging.log4j.core.appender.ConsoleAppender) {
@@ -120,6 +128,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -118,6 +126,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
}
new org.bukkit.craftbukkit.util.TerminalConsoleWriterThread(System.out, this.reader).start();
+ */
+ // 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 3f1ab69ac09c0c5ab50a99961a705254f3749f18..08708a42737ce66794083116f55ea209dbf81dcf 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java

View file

@ -15,7 +15,7 @@ This may cause additional prefixes to be disabled for plugins bypassing
the plugin logger.
diff --git a/pom.xml b/pom.xml
index ca6f4c4363189af1292898035cbb7a1e722d52e1..ef710ae3524032287aa2d2cad065b4b5973eb319 100644
index 2781d908fc9fcaa902fff1f86e7dffd86bd4c772..ee5747efddbbff3ed11caa6cca326e6c55b60fc8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -64,7 +64,7 @@

View file

@ -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 a1b4f01782c896347c821af93606ed5d3b501c8d..ca6f4c4363189af1292898035cbb7a1e722d52e1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -66,6 +66,11 @@
<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 6e19b41f41137de8379eb6e0c8650441445e0f2e..822933c4a9e1cc8297ab70f62d50a8e2a0756c0a 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -131,8 +131,10 @@ 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);

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Include Log4J2 SLF4J implementation
diff --git a/pom.xml b/pom.xml
index ef710ae3524032287aa2d2cad065b4b5973eb319..d4676c4711942e414890e7fb5f12e596337b62e2 100644
index ee5747efddbbff3ed11caa6cca326e6c55b60fc8..e3630cd3847c6a5d5b3c8a37fe6f101f938b8700 100644
--- a/pom.xml
+++ b/pom.xml
@@ -66,6 +66,12 @@

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerJumpEvent
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index bc084ade77cff987c41d148ce85fc61d6efb5feb..3290e50440dc22f5530272c2817c594028d3432e 100644
index 29b620bce44e3508dd7870347df4bbf02cef2662..3ab384f09f8b309fe204ac052db7ecaf70ba14a6 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -58,6 +58,8 @@ import org.bukkit.inventory.CraftingInventory;

View file

@ -15,7 +15,7 @@ also adding some additional logging in order to help work out what is causing
random disconnections for clients.
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 3290e50440dc22f5530272c2817c594028d3432e..01747ea997a68f55803553c330287b1bbe866c29 100644
index 3ab384f09f8b309fe204ac052db7ecaf70ba14a6..e272691a8f44eba88a344ea24bfcf5874f03bc1d 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2525,14 +2525,18 @@ public class PlayerConnection implements PacketListenerPlayIn {

View file

@ -17,7 +17,7 @@ from networking or during connections flood of chunk packets on slower clients,
at the cost of dead connections being kept open for longer.
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 01747ea997a68f55803553c330287b1bbe866c29..2eb2ddcb4456437bb449a86c18fb24c8629870a7 100644
index e272691a8f44eba88a344ea24bfcf5874f03bc1d..a3710f23d4ef254cda3fae83d8547507aa2a8696 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -70,7 +70,7 @@ public class PlayerConnection implements PacketListenerPlayIn {

View file

@ -14,7 +14,7 @@ completion, such as offline players.
Also adds isCommand and getLocation to the sync TabCompleteEvent
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 2eb2ddcb4456437bb449a86c18fb24c8629870a7..4452a6e7f550f362145ce6533e6cc77c367793eb 100644
index a3710f23d4ef254cda3fae83d8547507aa2a8696..4dc0b3a6054ef82ad675c30d30b6a7ad5acea400 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -521,10 +521,10 @@ public class PlayerConnection implements PacketListenerPlayIn {

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Fix exploit that allowed colored signs to be created
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 4452a6e7f550f362145ce6533e6cc77c367793eb..f6d650ca21cef8961e88e07d767478eeb5ec15d1 100644
index 4dc0b3a6054ef82ad675c30d30b6a7ad5acea400..c79db4e81883ce8635e91304b288f32e7bc2c763 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2537,7 +2537,7 @@ public class PlayerConnection implements PacketListenerPlayIn {

View file

@ -88,7 +88,7 @@ index 6a8327379e7520d31e5eb0a61893e6d9f23a6814..7ac4e006c76373d2aedb37adf22bbb30
this.o();
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index f6d650ca21cef8961e88e07d767478eeb5ec15d1..e1dcdfe3b498f4c0642921dd31b5e255cc7fc4c3 100644
index c79db4e81883ce8635e91304b288f32e7bc2c763..19524eb45c313be977e8fd68fd3dd5e470067542 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -37,6 +37,7 @@ import org.bukkit.event.inventory.ClickType;

View file

@ -16,7 +16,7 @@ Refresh the player inventory when PlayerInteractEntityEvent is
cancelled to avoid this problem.
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index e1dcdfe3b498f4c0642921dd31b5e255cc7fc4c3..0512f3a2df406cc18083883e2689945067dabb71 100644
index 19524eb45c313be977e8fd68fd3dd5e470067542..7be8745df9a7481e48e873b5595b8848b3e5c494 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1985,6 +1985,7 @@ public class PlayerConnection implements PacketListenerPlayIn {

View file

@ -5,12 +5,12 @@ Subject: [PATCH] Use asynchronous Log4j 2 loggers
diff --git a/pom.xml b/pom.xml
index d4676c4711942e414890e7fb5f12e596337b62e2..b67b01c5af49b948fc0642a8caa6d5df5c1ed13e 100644
index e3630cd3847c6a5d5b3c8a37fe6f101f938b8700..c10888b862541e244c9c9c60d45ef9fee59ae3e8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -77,6 +77,13 @@
<artifactId>log4j-iostreams</artifactId>
@@ -78,6 +78,13 @@
<version>2.8.1</version>
<scope>compile</scope>
</dependency>
+ <!-- Paper - Async loggers -->
+ <dependency>

Some files were not shown because too many files have changed in this diff Show more