From fea7ec356dba6c6ac28819ff11be604af6eb484e Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sat, 15 May 2021 02:46:23 +0100 Subject: [PATCH] Updated Upstream (BungeeCord) 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 BungeeCord Changes: f0908b66 Add optional 1.17 (21w19a) snapshot protocol support 5fa596fe #3084: (Regrettably) add a full SLF4J wrapper --- BungeeCord | 2 +- BungeeCord-Patches/0001-POM-Changes.patch | 18 +- ...erences-from-BungeeCord-to-Waterfall.patch | 10 +- ...04-Add-Waterfall-configuration-files.patch | 8 +- BungeeCord-Patches/0005-Disable-Metrics.patch | 12 +- ...0007-Get-rid-of-the-security-manager.patch | 8 +- .../0008-Fixup-ProtocolConstants.patch | 12 +- .../0016-Micro-optimizations.patch | 10 +- ...invalid-packet-ids-for-forge-servers.patch | 14 +- ...a-worker-and-a-boss-event-loop-group.patch | 16 +- ...-dynamic-server-addition-removal-api.patch | 8 +- ...able-server-version-in-ping-response.patch | 8 +- ...potion-race-condition-on-Forge-1.8.9.patch | 22 +- ...ogging-and-TerminalConsoleAppender-f.patch | 1156 ++++++++++++++++- .../0043-Forge-is-a-first-class-citizen.patch | 8 +- ...n-to-disable-entity-metadata-rewriti.patch | 6 +- .../0051-Speed-up-packet-construction.patch | 69 +- .../0054-Add-exception-reporting-event.patch | 8 +- 18 files changed, 1262 insertions(+), 133 deletions(-) diff --git a/BungeeCord b/BungeeCord index ada1b95..f0908b6 160000 --- a/BungeeCord +++ b/BungeeCord @@ -1 +1 @@ -Subproject commit ada1b95ffc3b26eb6cd9d0ad768897cf139833d4 +Subproject commit f0908b663f868ef5fe1f3ac8c81a29827cd6abe1 diff --git a/BungeeCord-Patches/0001-POM-Changes.patch b/BungeeCord-Patches/0001-POM-Changes.patch index 425e40d..a112e94 100644 --- a/BungeeCord-Patches/0001-POM-Changes.patch +++ b/BungeeCord-Patches/0001-POM-Changes.patch @@ -1,4 +1,4 @@ -From edd73ff3b9bd6de9849485ae8e0612cd8fbb0e83 Mon Sep 17 00:00:00 2001 +From 8025bd96688d2dd7a6b83a8b2cf2d2b54bd56f64 Mon Sep 17 00:00:00 2001 From: Tux Date: Thu, 19 May 2016 19:33:31 +0200 Subject: [PATCH] POM Changes @@ -7,7 +7,7 @@ Subject: [PATCH] POM Changes - Deploy to papermc mvn repo diff --git a/api/pom.xml b/api/pom.xml -index a502e8c3..0eb61e1d 100644 +index 6e8e84f5..ee3ab347 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -4,42 +4,42 @@ @@ -491,7 +491,7 @@ index cf46174c..db15febb 100644 diff --git a/pom.xml b/pom.xml -index 4305537d..12c285f2 100644 +index 8b5feae5..2e9160a2 100644 --- a/pom.xml +++ b/pom.xml @@ -3,18 +3,25 @@ @@ -549,7 +549,7 @@ index 4305537d..12c285f2 100644 -@@ -45,28 +64,24 @@ +@@ -46,28 +65,24 @@ @@ -588,7 +588,7 @@ index 4305537d..12c285f2 100644 -@@ -123,12 +138,21 @@ +@@ -124,12 +139,21 @@ @@ -610,7 +610,7 @@ index 4305537d..12c285f2 100644 org.apache.maven.plugins maven-checkstyle-plugin 3.1.1 -@@ -153,6 +177,7 @@ +@@ -154,6 +178,7 @@ @@ -618,7 +618,7 @@ index 4305537d..12c285f2 100644 org.codehaus.mojo animal-sniffer-maven-plugin -@@ -320,5 +345,88 @@ +@@ -321,5 +346,88 @@ @@ -749,7 +749,7 @@ index 5ec853a5..402266ca 100644 compile diff --git a/proxy/pom.xml b/proxy/pom.xml -index 9f663469..4aeb9cbe 100644 +index 086b9e79..bd636f36 100644 --- a/proxy/pom.xml +++ b/proxy/pom.xml @@ -4,18 +4,18 @@ @@ -861,5 +861,5 @@ index 3023d072..8ce88f4a 100644 compile -- -2.31.0 +2.31.1 diff --git a/BungeeCord-Patches/0003-Rename-references-from-BungeeCord-to-Waterfall.patch b/BungeeCord-Patches/0003-Rename-references-from-BungeeCord-to-Waterfall.patch index fe23af2..0a2ddd4 100644 --- a/BungeeCord-Patches/0003-Rename-references-from-BungeeCord-to-Waterfall.patch +++ b/BungeeCord-Patches/0003-Rename-references-from-BungeeCord-to-Waterfall.patch @@ -1,4 +1,4 @@ -From ffb65e34665a6850d6fad13f5df3d5281759d7d8 Mon Sep 17 00:00:00 2001 +From 89ae104b3d0ab58d2ebb90d336173202455c9dd6 Mon Sep 17 00:00:00 2001 From: Tux Date: Thu, 19 May 2016 11:28:45 -0700 Subject: [PATCH] Rename references from BungeeCord to Waterfall @@ -18,10 +18,10 @@ index f1ccd4f6..d703d6d2 100644 } diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java -index c04c3e8e..b18d4854 100644 +index f80c0486..998316c3 100644 --- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java +++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java -@@ -186,7 +186,7 @@ public class BungeeCord extends ProxyServer +@@ -187,7 +187,7 @@ public class BungeeCord extends ProxyServer public BungeeCord() throws IOException { // Java uses ! to indicate a resource inside of a jar/zip/other container. Running Bungee from within a directory that has a ! will cause this to muck up. @@ -30,7 +30,7 @@ index c04c3e8e..b18d4854 100644 System.setSecurityManager( new BungeeSecurityManager() ); -@@ -528,7 +528,7 @@ public class BungeeCord extends ProxyServer +@@ -530,7 +530,7 @@ public class BungeeCord extends ProxyServer @Override public String getName() { @@ -101,5 +101,5 @@ index c0620445..e65558ad 100644 SocketAddress address = Util.getAddr( addr ); ServerInfo info = ProxyServer.getInstance().constructServerInfo( name, address, motd, restricted ); -- -2.27.0 +2.31.1 diff --git a/BungeeCord-Patches/0004-Add-Waterfall-configuration-files.patch b/BungeeCord-Patches/0004-Add-Waterfall-configuration-files.patch index 77aa8c5..5fe6c05 100644 --- a/BungeeCord-Patches/0004-Add-Waterfall-configuration-files.patch +++ b/BungeeCord-Patches/0004-Add-Waterfall-configuration-files.patch @@ -1,4 +1,4 @@ -From fdd8855b8ca5c05d5a43b5a51888139a6c086911 Mon Sep 17 00:00:00 2001 +From 7824ec691a9fb695159ed9a74c7b623f86668cd6 Mon Sep 17 00:00:00 2001 From: Techcable Date: Tue, 25 Oct 2016 11:58:37 -0400 Subject: [PATCH] Add Waterfall configuration files @@ -42,7 +42,7 @@ index 00000000..741ebfde + +} diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java -index b18d4854..c1c0f227 100644 +index 998316c3..f8f3fb44 100644 --- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java +++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java @@ -10,6 +10,7 @@ import com.google.common.util.concurrent.ThreadFactoryBuilder; @@ -53,7 +53,7 @@ index b18d4854..c1c0f227 100644 import io.netty.bootstrap.ServerBootstrap; import io.netty.channel.Channel; import io.netty.channel.ChannelException; -@@ -110,7 +111,7 @@ public class BungeeCord extends ProxyServer +@@ -111,7 +112,7 @@ public class BungeeCord extends ProxyServer * Configuration. */ @Getter @@ -118,5 +118,5 @@ index e65558ad..65121ba2 100644 if ( permissions == null ) { -- -2.27.0 +2.31.1 diff --git a/BungeeCord-Patches/0005-Disable-Metrics.patch b/BungeeCord-Patches/0005-Disable-Metrics.patch index 67bf50f..34217be 100644 --- a/BungeeCord-Patches/0005-Disable-Metrics.patch +++ b/BungeeCord-Patches/0005-Disable-Metrics.patch @@ -1,4 +1,4 @@ -From 141101eee99241068152524fea62f05cc675267f Mon Sep 17 00:00:00 2001 +From 667ad1f7ae23c9bb8010653312c5c6dba5c64823 Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Thu, 19 May 2016 10:55:20 -0700 Subject: [PATCH] Disable Metrics @@ -6,10 +6,10 @@ Subject: [PATCH] Disable Metrics MCStats has not been stable for a long while now, and in our opinion it is not worth migrating to an alternative service. Waterfall has been maintained for the past two years without any or much consideration to statistics, we have users and that's enough for us ;) diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java -index c1c0f227..15f37d61 100644 +index f8f3fb44..16d4e433 100644 --- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java +++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java -@@ -122,7 +122,7 @@ public class BungeeCord extends ProxyServer +@@ -123,7 +123,7 @@ public class BungeeCord extends ProxyServer * locations.yml save thread. */ private final Timer saveThread = new Timer( "Reconnect Saver" ); @@ -18,7 +18,7 @@ index c1c0f227..15f37d61 100644 /** * Server socket listener. */ -@@ -302,7 +302,7 @@ public class BungeeCord extends ProxyServer +@@ -304,7 +304,7 @@ public class BungeeCord extends ProxyServer } } }, 0, TimeUnit.MINUTES.toMillis( 5 ) ); @@ -27,7 +27,7 @@ index c1c0f227..15f37d61 100644 Runtime.getRuntime().addShutdownHook( new Thread() { -@@ -460,7 +460,7 @@ public class BungeeCord extends ProxyServer +@@ -462,7 +462,7 @@ public class BungeeCord extends ProxyServer reconnectHandler.close(); } saveThread.cancel(); @@ -177,5 +177,5 @@ index eabf7573..00000000 - } -} -- -2.27.0 +2.31.1 diff --git a/BungeeCord-Patches/0007-Get-rid-of-the-security-manager.patch b/BungeeCord-Patches/0007-Get-rid-of-the-security-manager.patch index 54d374c..30243ea 100644 --- a/BungeeCord-Patches/0007-Get-rid-of-the-security-manager.patch +++ b/BungeeCord-Patches/0007-Get-rid-of-the-security-manager.patch @@ -1,4 +1,4 @@ -From e4c9530598b8bd42274013d7830320f2ceef36e0 Mon Sep 17 00:00:00 2001 +From 6263c6b63509c82ce47e619b02513b50cd5baa11 Mon Sep 17 00:00:00 2001 From: Tux Date: Mon, 25 Jan 2016 01:19:07 -0500 Subject: [PATCH] Get rid of the security manager. @@ -6,10 +6,10 @@ Subject: [PATCH] Get rid of the security manager. There's a lot of opinions running on both sides of the debate, but we overwhelmingly feel that the security manager does not help the vast majority of BungeeCord users or plugin developers create correct code. diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java -index 15f37d61..bcb229c3 100644 +index 16d4e433..8464fefb 100644 --- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java +++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java -@@ -189,8 +189,6 @@ public class BungeeCord extends ProxyServer +@@ -190,8 +190,6 @@ public class BungeeCord extends ProxyServer // Java uses ! to indicate a resource inside of a jar/zip/other container. Running Bungee from within a directory that has a ! will cause this to muck up. Preconditions.checkState( new File( "." ).getAbsolutePath().indexOf( '!' ) == -1, "Cannot use Waterfall in directory with ! in path." ); @@ -103,5 +103,5 @@ index 53c81923..00000000 - } -} -- -2.27.0 +2.31.1 diff --git a/BungeeCord-Patches/0008-Fixup-ProtocolConstants.patch b/BungeeCord-Patches/0008-Fixup-ProtocolConstants.patch index d8d904f..a05e91d 100644 --- a/BungeeCord-Patches/0008-Fixup-ProtocolConstants.patch +++ b/BungeeCord-Patches/0008-Fixup-ProtocolConstants.patch @@ -1,16 +1,16 @@ -From d999240c7a6c80605cd508cf23bfd3c01cddbce2 Mon Sep 17 00:00:00 2001 +From 71e089cca23ec8294bf19553e151b7c8e0f47f32 Mon Sep 17 00:00:00 2001 From: Troy Frew Date: Tue, 15 Nov 2016 09:07:51 -0500 Subject: [PATCH] Fixup ProtocolConstants diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/ProtocolConstants.java b/protocol/src/main/java/net/md_5/bungee/protocol/ProtocolConstants.java -index bf316417..2202c4d3 100644 +index 30f1306a..391443ca 100644 --- a/protocol/src/main/java/net/md_5/bungee/protocol/ProtocolConstants.java +++ b/protocol/src/main/java/net/md_5/bungee/protocol/ProtocolConstants.java -@@ -74,6 +74,16 @@ public class ProtocolConstants - ProtocolConstants.MINECRAFT_1_16_4 - ); +@@ -91,6 +91,16 @@ public class ProtocolConstants + SUPPORTED_VERSION_IDS = supportedVersionIds.build(); + } + public static final boolean isBeforeOrEq(int before, int other) + { @@ -26,5 +26,5 @@ index bf316417..2202c4d3 100644 { -- -2.29.2 +2.31.1 diff --git a/BungeeCord-Patches/0016-Micro-optimizations.patch b/BungeeCord-Patches/0016-Micro-optimizations.patch index e0e7fda..a0a2b8a 100644 --- a/BungeeCord-Patches/0016-Micro-optimizations.patch +++ b/BungeeCord-Patches/0016-Micro-optimizations.patch @@ -1,4 +1,4 @@ -From 17dc40e613083bdbc436c7d7f075e09690fa1c58 Mon Sep 17 00:00:00 2001 +From 38cac6bb66605dd7c39c7a1c0c7eba5ad25a43a7 Mon Sep 17 00:00:00 2001 From: Tux Date: Tue, 19 Jan 2016 15:13:29 -0700 Subject: [PATCH] Micro-optimizations @@ -8,10 +8,10 @@ Subject: [PATCH] Micro-optimizations - Don't create a data input stream for every plugin message we get from servers diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java -index bcb229c3..b9d624f8 100644 +index 8464fefb..a1752045 100644 --- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java +++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java -@@ -557,7 +557,9 @@ public class BungeeCord extends ProxyServer +@@ -559,7 +559,9 @@ public class BungeeCord extends ProxyServer String translation = ""; try { @@ -23,7 +23,7 @@ index bcb229c3..b9d624f8 100644 { } diff --git a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java -index 653242f0..d1e57953 100644 +index 552b0b17..a859195e 100644 --- a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java +++ b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java @@ -250,7 +250,6 @@ public class DownstreamBridge extends PacketHandler @@ -43,5 +43,5 @@ index 653242f0..d1e57953 100644 String subChannel = in.readUTF(); -- -2.24.0 +2.31.1 diff --git a/BungeeCord-Patches/0017-Allow-invalid-packet-ids-for-forge-servers.patch b/BungeeCord-Patches/0017-Allow-invalid-packet-ids-for-forge-servers.patch index f989827..84a319f 100644 --- a/BungeeCord-Patches/0017-Allow-invalid-packet-ids-for-forge-servers.patch +++ b/BungeeCord-Patches/0017-Allow-invalid-packet-ids-for-forge-servers.patch @@ -1,4 +1,4 @@ -From ce2efc22510538721c07bb4ba4d6cebe5da85885 Mon Sep 17 00:00:00 2001 +From ec9c98165375395d0ab4726f8b56182495682203 Mon Sep 17 00:00:00 2001 From: Techcable Date: Thu, 19 May 2016 17:09:22 -0600 Subject: [PATCH] Allow invalid packet ids for forge servers @@ -37,10 +37,10 @@ index d36b7f3c..5e03e175 100644 { packet.read( in, prot.getDirection(), protocolVersion ); diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java b/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java -index caf4a685..50a911c2 100644 +index de94bfda..4b16a50f 100644 --- a/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java +++ b/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java -@@ -441,14 +441,23 @@ public enum Protocol +@@ -475,14 +475,23 @@ public enum Protocol return protocol; } @@ -93,7 +93,7 @@ index bafd741b..4d0fa540 100644 ch.write( BungeeCord.getInstance().registerChannels( user.getPendingConnection().getVersion() ) ); diff --git a/proxy/src/main/java/net/md_5/bungee/UserConnection.java b/proxy/src/main/java/net/md_5/bungee/UserConnection.java -index e0b48763..b64d3f50 100644 +index cb722d78..b0e7e392 100644 --- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java +++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java @@ -72,6 +72,7 @@ public final class UserConnection implements ProxiedPlayer @@ -105,10 +105,10 @@ index e0b48763..b64d3f50 100644 @Getter @NonNull diff --git a/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap.java b/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap.java -index 53911d1c..4a27148f 100644 +index 93989ee9..2e6cf764 100644 --- a/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap.java +++ b/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap.java -@@ -322,6 +322,12 @@ public abstract class EntityMap +@@ -324,6 +324,12 @@ public abstract class EntityMap int packetId = DefinedPacket.readVarInt( packet ); int packetIdLength = packet.readerIndex() - readerIndex; @@ -122,5 +122,5 @@ index 53911d1c..4a27148f 100644 { rewriteInt( packet, oldId, newId, readerIndex + packetIdLength ); -- -2.30.1 +2.31.1 diff --git a/BungeeCord-Patches/0022-Use-a-worker-and-a-boss-event-loop-group.patch b/BungeeCord-Patches/0022-Use-a-worker-and-a-boss-event-loop-group.patch index a169504..0af8cc7 100644 --- a/BungeeCord-Patches/0022-Use-a-worker-and-a-boss-event-loop-group.patch +++ b/BungeeCord-Patches/0022-Use-a-worker-and-a-boss-event-loop-group.patch @@ -1,4 +1,4 @@ -From 8f074b87748c968933368cc6a9dbfe8daf018321 Mon Sep 17 00:00:00 2001 +From a4f2f8f88907fb0652ef6f9585fa221f45d04e25 Mon Sep 17 00:00:00 2001 From: kamcio96 Date: Mon, 14 Mar 2016 16:07:20 -0700 Subject: [PATCH] Use a worker and a boss event loop group. @@ -8,10 +8,10 @@ Merges the rest of https://github.com/SpigotMC/BungeeCord/pull/1706 by @kamcio96 This is proper practice for netty. diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java -index b9d624f8..8649c91e 100644 +index a1752045..7c19832f 100644 --- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java +++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java -@@ -117,7 +117,7 @@ public class BungeeCord extends ProxyServer +@@ -118,7 +118,7 @@ public class BungeeCord extends ProxyServer */ private ResourceBundle baseBundle; private ResourceBundle customBundle; @@ -20,7 +20,7 @@ index b9d624f8..8649c91e 100644 /** * locations.yml save thread. */ -@@ -258,7 +258,8 @@ public class BungeeCord extends ProxyServer +@@ -260,7 +260,8 @@ public class BungeeCord extends ProxyServer ResourceLeakDetector.setLevel( ResourceLeakDetector.Level.DISABLED ); // Eats performance } @@ -30,7 +30,7 @@ index b9d624f8..8649c91e 100644 File moduleDirectory = new File( "modules" ); moduleManager.load( this, moduleDirectory ); -@@ -347,7 +348,7 @@ public class BungeeCord extends ProxyServer +@@ -349,7 +350,7 @@ public class BungeeCord extends ProxyServer .option( ChannelOption.SO_REUSEADDR, true ) // TODO: Move this elsewhere! .childAttr( PipelineUtils.LISTENER, info ) .childHandler( PipelineUtils.SERVER_CHILD ) @@ -39,7 +39,7 @@ index b9d624f8..8649c91e 100644 .localAddress( info.getSocketAddress() ) .bind().addListener( listener ); -@@ -370,7 +371,7 @@ public class BungeeCord extends ProxyServer +@@ -372,7 +373,7 @@ public class BungeeCord extends ProxyServer } } }; @@ -48,7 +48,7 @@ index b9d624f8..8649c91e 100644 } } } -@@ -479,12 +480,14 @@ public class BungeeCord extends ProxyServer +@@ -481,12 +482,14 @@ public class BungeeCord extends ProxyServer } getLogger().info( "Closing IO threads" ); @@ -83,5 +83,5 @@ index 9d581d9a..7b002089 100644 .option( ChannelOption.CONNECT_TIMEOUT_MILLIS, BungeeCord.getInstance().getConfig().getRemotePingTimeout() ) .remoteAddress( socketAddress ) -- -2.27.0 +2.31.1 diff --git a/BungeeCord-Patches/0025-Add-dynamic-server-addition-removal-api.patch b/BungeeCord-Patches/0025-Add-dynamic-server-addition-removal-api.patch index 78915c0..5bf6cd0 100644 --- a/BungeeCord-Patches/0025-Add-dynamic-server-addition-removal-api.patch +++ b/BungeeCord-Patches/0025-Add-dynamic-server-addition-removal-api.patch @@ -1,4 +1,4 @@ -From 52eda421ee5716573aaa584cc7c08014f647b533 Mon Sep 17 00:00:00 2001 +From f1d3445b11e8ebb0eec708d50155484086c89114 Mon Sep 17 00:00:00 2001 From: Troy Frew Date: Wed, 29 Jun 2016 04:29:25 +0200 Subject: [PATCH] Add dynamic server addition/removal api. @@ -170,10 +170,10 @@ index 59c104d3..698b420f 100644 private final String lower = ( args.length == 0 ) ? "" : args[0].toLowerCase( Locale.ROOT ); diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java -index 8649c91e..1d141981 100644 +index 7c19832f..99636fb4 100644 --- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java +++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java -@@ -633,10 +633,18 @@ public class BungeeCord extends ProxyServer +@@ -635,10 +635,18 @@ public class BungeeCord extends ProxyServer return config.getServers(); } @@ -311,5 +311,5 @@ index d640313a..115f614e 100644 + // Waterfall end } -- -2.27.0 +2.31.1 diff --git a/BungeeCord-Patches/0028-Configurable-server-version-in-ping-response.patch b/BungeeCord-Patches/0028-Configurable-server-version-in-ping-response.patch index ef14265..5683379 100644 --- a/BungeeCord-Patches/0028-Configurable-server-version-in-ping-response.patch +++ b/BungeeCord-Patches/0028-Configurable-server-version-in-ping-response.patch @@ -1,4 +1,4 @@ -From 05f79876d9c969dd45af3c5c3d0e0751c19b997d Mon Sep 17 00:00:00 2001 +From 412c2a4b879a3efbd8eab0cc66345f8a3146dcc0 Mon Sep 17 00:00:00 2001 From: Troy Frew Date: Wed, 29 Jun 2016 13:56:57 -0500 Subject: [PATCH] Configurable server version in ping response @@ -66,10 +66,10 @@ index 91743f01..111404fb 100644 public int getTabThrottle() { return tabThrottle; diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java -index 1d141981..8c933123 100644 +index 99636fb4..1f6ba085 100644 --- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java +++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java -@@ -687,7 +687,7 @@ public class BungeeCord extends ProxyServer +@@ -689,7 +689,7 @@ public class BungeeCord extends ProxyServer @Override public String getGameVersion() { @@ -79,5 +79,5 @@ index 1d141981..8c933123 100644 @Override -- -2.27.0 +2.31.1 diff --git a/BungeeCord-Patches/0032-Fix-potion-race-condition-on-Forge-1.8.9.patch b/BungeeCord-Patches/0032-Fix-potion-race-condition-on-Forge-1.8.9.patch index 7d7dfd5..2163f34 100644 --- a/BungeeCord-Patches/0032-Fix-potion-race-condition-on-Forge-1.8.9.patch +++ b/BungeeCord-Patches/0032-Fix-potion-race-condition-on-Forge-1.8.9.patch @@ -1,14 +1,14 @@ -From 266bc30c5330ef442070a9e7d122d756ca7dca0b Mon Sep 17 00:00:00 2001 +From f707e409d6b91c060aee223c15db2715f8df5693 Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Thu, 15 Sep 2016 22:38:37 +0200 Subject: [PATCH] Fix potion race condition on Forge 1.8.9 diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/AbstractPacketHandler.java b/protocol/src/main/java/net/md_5/bungee/protocol/AbstractPacketHandler.java -index ac31e435..252389bd 100644 +index 15a61b7e..ee2317e8 100644 --- a/protocol/src/main/java/net/md_5/bungee/protocol/AbstractPacketHandler.java +++ b/protocol/src/main/java/net/md_5/bungee/protocol/AbstractPacketHandler.java -@@ -7,6 +7,8 @@ import net.md_5.bungee.protocol.packet.ClientStatus; +@@ -8,6 +8,8 @@ import net.md_5.bungee.protocol.packet.ClientStatus; import net.md_5.bungee.protocol.packet.Commands; import net.md_5.bungee.protocol.packet.EncryptionRequest; import net.md_5.bungee.protocol.packet.EncryptionResponse; @@ -17,7 +17,7 @@ index ac31e435..252389bd 100644 import net.md_5.bungee.protocol.packet.EntityStatus; import net.md_5.bungee.protocol.packet.GameState; import net.md_5.bungee.protocol.packet.Handshake; -@@ -178,4 +180,14 @@ public abstract class AbstractPacketHandler +@@ -193,4 +195,14 @@ public abstract class AbstractPacketHandler public void handle(GameState gameState) throws Exception { } @@ -33,10 +33,10 @@ index ac31e435..252389bd 100644 + // Waterfall end } diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java b/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java -index 50a911c2..3a686e60 100644 +index 4b16a50f..c856f365 100644 --- a/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java +++ b/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java -@@ -17,6 +17,8 @@ import net.md_5.bungee.protocol.packet.EncryptionRequest; +@@ -18,6 +18,8 @@ import net.md_5.bungee.protocol.packet.EncryptionRequest; import net.md_5.bungee.protocol.packet.EncryptionResponse; import net.md_5.bungee.protocol.packet.EntityStatus; import net.md_5.bungee.protocol.packet.GameState; @@ -45,9 +45,9 @@ index 50a911c2..3a686e60 100644 import net.md_5.bungee.protocol.packet.Handshake; import net.md_5.bungee.protocol.packet.KeepAlive; import net.md_5.bungee.protocol.packet.Kick; -@@ -106,6 +108,18 @@ public enum Protocol - map( ProtocolConstants.MINECRAFT_1_15, 0x0D ), - map( ProtocolConstants.MINECRAFT_1_16, 0x0C ) +@@ -114,6 +116,18 @@ public enum Protocol + map( ProtocolConstants.MINECRAFT_1_16, 0x0C ), + map( ProtocolConstants.MINECRAFT_1_17, 0x0D ) ); + // Waterfall start + TO_CLIENT.registerPacket( @@ -64,7 +64,7 @@ index 50a911c2..3a686e60 100644 TO_CLIENT.registerPacket( PlayerListItem.class, // PlayerInfo map( ProtocolConstants.MINECRAFT_1_8, 0x38 ), -@@ -501,9 +515,11 @@ public enum Protocol +@@ -535,9 +549,11 @@ public enum Protocol } } @@ -170,7 +170,7 @@ index 00000000..7ed2dc3a + } +} diff --git a/proxy/src/main/java/net/md_5/bungee/UserConnection.java b/proxy/src/main/java/net/md_5/bungee/UserConnection.java -index 5e3c27a3..bc8156cc 100644 +index 5e4c4518..c3cc914d 100644 --- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java +++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java @@ -1,7 +1,9 @@ diff --git a/BungeeCord-Patches/0036-Use-Log4j2-for-logging-and-TerminalConsoleAppender-f.patch b/BungeeCord-Patches/0036-Use-Log4j2-for-logging-and-TerminalConsoleAppender-f.patch index aabb71d..984b065 100644 --- a/BungeeCord-Patches/0036-Use-Log4j2-for-logging-and-TerminalConsoleAppender-f.patch +++ b/BungeeCord-Patches/0036-Use-Log4j2-for-logging-and-TerminalConsoleAppender-f.patch @@ -1,4 +1,4 @@ -From 92b6a65c214965a5dd2422d1d4e78eeffb793d6f Mon Sep 17 00:00:00 2001 +From 94d4370d668dc6cd1056707e1f33ef26eda9f961 Mon Sep 17 00:00:00 2001 From: Minecrell Date: Fri, 22 Sep 2017 12:46:47 +0200 Subject: [PATCH] Use Log4j2 for logging and TerminalConsoleAppender for @@ -233,10 +233,10 @@ index 00000000..93ce3b14 + + diff --git a/pom.xml b/pom.xml -index 12c285f2..56bb4a7a 100644 +index 2e9160a2..02480a20 100644 --- a/pom.xml +++ b/pom.xml -@@ -56,6 +56,7 @@ +@@ -56,11 +56,12 @@ config event log @@ -244,8 +244,14 @@ index 12c285f2..56bb4a7a 100644 module protocol proxy + query +- slf4j ++ + native + + diff --git a/proxy/pom.xml b/proxy/pom.xml -index 31e172c7..ca1fc13b 100644 +index 645835d8..602b9a93 100644 --- a/proxy/pom.xml +++ b/proxy/pom.xml @@ -71,7 +71,7 @@ @@ -257,11 +263,32 @@ index 31e172c7..ca1fc13b 100644 ${project.version} compile -@@ -130,6 +130,19 @@ - 1.7.30 +@@ -93,12 +93,13 @@ + ${project.version} compile -+ ++ + + net.sf.jopt-simple + jopt-simple +@@ -130,6 +131,25 @@ + 1.6.2 + compile + ++ ++ ++ org.slf4j ++ slf4j-jdk14 ++ 1.7.30 ++ compile ++ + + net.minecrell + terminalconsoleappender @@ -323,7 +350,7 @@ index 00000000..765d24bc + +} diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java -index 8c933123..d71556a7 100644 +index 1f6ba085..617a077f 100644 --- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java +++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java @@ -46,7 +46,6 @@ import java.util.concurrent.locks.ReentrantReadWriteLock; @@ -349,15 +376,16 @@ index 8c933123..d71556a7 100644 import net.md_5.bungee.module.ModuleManager; import net.md_5.bungee.netty.PipelineUtils; import net.md_5.bungee.protocol.DefinedPacket; -@@ -95,7 +91,6 @@ import net.md_5.bungee.protocol.packet.PluginMessage; +@@ -95,8 +91,6 @@ import net.md_5.bungee.protocol.packet.PluginMessage; import net.md_5.bungee.query.RemoteQuery; import net.md_5.bungee.scheduler.BungeeScheduler; import net.md_5.bungee.util.CaseInsensitiveMap; -import org.fusesource.jansi.AnsiConsole; +-import org.slf4j.impl.JDK14LoggerFactory; /** * Main BungeeCord proxy class. -@@ -156,8 +151,12 @@ public class BungeeCord extends ProxyServer +@@ -157,8 +151,12 @@ public class BungeeCord extends ProxyServer private final File pluginsFolder = new File( "plugins" ); @Getter private final BungeeScheduler scheduler = new BungeeScheduler(); @@ -370,7 +398,7 @@ index 8c933123..d71556a7 100644 @Getter private final Logger logger; public final Gson gson = new GsonBuilder() -@@ -208,6 +207,8 @@ public class BungeeCord extends ProxyServer +@@ -209,6 +207,8 @@ public class BungeeCord extends ProxyServer // BungeeCord. This version is only used when extracting the libraries to their temp folder. System.setProperty( "library.jansi.version", "BungeeCord" ); @@ -379,8 +407,8 @@ index 8c933123..d71556a7 100644 AnsiConsole.systemInstall(); consoleReader = new ConsoleReader(); consoleReader.setExpandEvents( false ); -@@ -216,6 +217,9 @@ public class BungeeCord extends ProxyServer - logger = new BungeeLogger( "BungeeCord", "proxy.log", consoleReader ); +@@ -218,6 +218,9 @@ public class BungeeCord extends ProxyServer + JDK14LoggerFactory.LOGGER = logger; System.setErr( new PrintStream( new LoggingOutputStream( logger, Level.SEVERE ), true ) ); System.setOut( new PrintStream( new LoggingOutputStream( logger, Level.INFO ), true ) ); + */ @@ -456,6 +484,1106 @@ index 10366c88..8c5cc949 100644 return; } +diff --git a/slf4j/nb-configuration.xml b/slf4j/nb-configuration.xml +deleted file mode 100644 +index 7e465924..00000000 +--- a/slf4j/nb-configuration.xml ++++ /dev/null +@@ -1,31 +0,0 @@ +- +- +- +- +- +- project +- NEW_LINE +- NEW_LINE +- NEW_LINE +- true +- true +- true +- true +- true +- true +- true +- true +- true +- true +- +- +diff --git a/slf4j/pom.xml b/slf4j/pom.xml +deleted file mode 100644 +index e7f19178..00000000 +--- a/slf4j/pom.xml ++++ /dev/null +@@ -1,35 +0,0 @@ +- +- +- 4.0.0 +- +- +- net.md-5 +- bungeecord-parent +- 1.16-R0.5-SNAPSHOT +- ../pom.xml +- +- +- net.md-5 +- bungeecord-slf4j +- 1.16-R0.5-SNAPSHOT +- jar +- +- BungeeCord-SLF4J +- Wrapper over SLF4J for BungeeCord purposes. +- +- +- true +- true +- true +- +- +- +- +- org.slf4j +- slf4j-api +- 1.7.30 +- compile +- +- +- +diff --git a/slf4j/src/main/java/org/slf4j/impl/JDK14LoggerAdapter.java b/slf4j/src/main/java/org/slf4j/impl/JDK14LoggerAdapter.java +deleted file mode 100644 +index 7cfafc88..00000000 +--- a/slf4j/src/main/java/org/slf4j/impl/JDK14LoggerAdapter.java ++++ /dev/null +@@ -1,694 +0,0 @@ +-/** +- * Copyright (c) 2004-2011 QOS.ch +- * All rights reserved. +- * +- * Permission is hereby granted, free of charge, to any person obtaining +- * a copy of this software and associated documentation files (the +- * "Software"), to deal in the Software without restriction, including +- * without limitation the rights to use, copy, modify, merge, publish, +- * distribute, sublicense, and/or sell copies of the Software, and to +- * permit persons to whom the Software is furnished to do so, subject to +- * the following conditions: +- * +- * The above copyright notice and this permission notice shall be +- * included in all copies or substantial portions of the Software. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +- * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +- * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +- * +- */ +-package org.slf4j.impl; +- +-import java.util.logging.Level; +-import java.util.logging.LogRecord; +- +-import org.slf4j.Logger; +-import org.slf4j.Marker; +-import org.slf4j.event.EventConstants; +-import org.slf4j.event.LoggingEvent; +-import org.slf4j.helpers.FormattingTuple; +-import org.slf4j.helpers.MarkerIgnoringBase; +-import org.slf4j.helpers.MessageFormatter; +-import org.slf4j.spi.LocationAwareLogger; +- +-/** +- * A wrapper over {@link java.util.logging.Logger java.util.logging.Logger} in +- * conformity with the {@link Logger} interface. Note that the logging levels +- * mentioned in this class refer to those defined in the java.util.logging +- * package. +- * +- * @author Ceki Gülcü +- * @author Peter Royal +- */ +-public final class JDK14LoggerAdapter extends MarkerIgnoringBase implements LocationAwareLogger { +- +- private static final long serialVersionUID = -8053026990503422791L; +- +- transient final java.util.logging.Logger logger; +- +- // WARN: JDK14LoggerAdapter constructor should have only package access so +- // that only JDK14LoggerFactory be able to create one. +- JDK14LoggerAdapter(java.util.logging.Logger logger) { +- this.logger = logger; +- this.name = logger.getName(); +- } +- +- /** +- * Is this logger instance enabled for the FINEST level? +- * +- * @return True if this Logger is enabled for level FINEST, false otherwise. +- */ +- public boolean isTraceEnabled() { +- return logger.isLoggable(Level.FINEST); +- } +- +- /** +- * Log a message object at level FINEST. +- * +- * @param msg +- * - the message object to be logged +- */ +- public void trace(String msg) { +- if (logger.isLoggable(Level.FINEST)) { +- log(SELF, Level.FINEST, msg, null); +- } +- } +- +- /** +- * Log a message at level FINEST according to the specified format and +- * argument. +- * +- *

+- * This form avoids superfluous object creation when the logger is disabled +- * for level FINEST. +- *

+- * +- * @param format +- * the format string +- * @param arg +- * the argument +- */ +- public void trace(String format, Object arg) { +- if (logger.isLoggable(Level.FINEST)) { +- FormattingTuple ft = MessageFormatter.format(format, arg); +- log(SELF, Level.FINEST, ft.getMessage(), ft.getThrowable()); +- } +- } +- +- /** +- * Log a message at level FINEST according to the specified format and +- * arguments. +- * +- *

+- * This form avoids superfluous object creation when the logger is disabled +- * for the FINEST level. +- *

+- * +- * @param format +- * the format string +- * @param arg1 +- * the first argument +- * @param arg2 +- * the second argument +- */ +- public void trace(String format, Object arg1, Object arg2) { +- if (logger.isLoggable(Level.FINEST)) { +- FormattingTuple ft = MessageFormatter.format(format, arg1, arg2); +- log(SELF, Level.FINEST, ft.getMessage(), ft.getThrowable()); +- } +- } +- +- /** +- * Log a message at level FINEST according to the specified format and +- * arguments. +- * +- *

+- * This form avoids superfluous object creation when the logger is disabled +- * for the FINEST level. +- *

+- * +- * @param format +- * the format string +- * @param argArray +- * an array of arguments +- */ +- public void trace(String format, Object... argArray) { +- if (logger.isLoggable(Level.FINEST)) { +- FormattingTuple ft = MessageFormatter.arrayFormat(format, argArray); +- log(SELF, Level.FINEST, ft.getMessage(), ft.getThrowable()); +- } +- } +- +- /** +- * Log an exception (throwable) at level FINEST with an accompanying message. +- * +- * @param msg +- * the message accompanying the exception +- * @param t +- * the exception (throwable) to log +- */ +- public void trace(String msg, Throwable t) { +- if (logger.isLoggable(Level.FINEST)) { +- log(SELF, Level.FINEST, msg, t); +- } +- } +- +- /** +- * Is this logger instance enabled for the FINE level? +- * +- * @return True if this Logger is enabled for level FINE, false otherwise. +- */ +- public boolean isDebugEnabled() { +- return logger.isLoggable(Level.FINE); +- } +- +- /** +- * Log a message object at level FINE. +- * +- * @param msg +- * - the message object to be logged +- */ +- public void debug(String msg) { +- if (logger.isLoggable(Level.FINE)) { +- log(SELF, Level.FINE, msg, null); +- } +- } +- +- /** +- * Log a message at level FINE according to the specified format and argument. +- * +- *

+- * This form avoids superfluous object creation when the logger is disabled +- * for level FINE. +- *

+- * +- * @param format +- * the format string +- * @param arg +- * the argument +- */ +- public void debug(String format, Object arg) { +- if (logger.isLoggable(Level.FINE)) { +- FormattingTuple ft = MessageFormatter.format(format, arg); +- log(SELF, Level.FINE, ft.getMessage(), ft.getThrowable()); +- } +- } +- +- /** +- * Log a message at level FINE according to the specified format and +- * arguments. +- * +- *

+- * This form avoids superfluous object creation when the logger is disabled +- * for the FINE level. +- *

+- * +- * @param format +- * the format string +- * @param arg1 +- * the first argument +- * @param arg2 +- * the second argument +- */ +- public void debug(String format, Object arg1, Object arg2) { +- if (logger.isLoggable(Level.FINE)) { +- FormattingTuple ft = MessageFormatter.format(format, arg1, arg2); +- log(SELF, Level.FINE, ft.getMessage(), ft.getThrowable()); +- } +- } +- +- /** +- * Log a message at level FINE according to the specified format and +- * arguments. +- * +- *

+- * This form avoids superfluous object creation when the logger is disabled +- * for the FINE level. +- *

+- * +- * @param format +- * the format string +- * @param argArray +- * an array of arguments +- */ +- public void debug(String format, Object... argArray) { +- if (logger.isLoggable(Level.FINE)) { +- FormattingTuple ft = MessageFormatter.arrayFormat(format, argArray); +- log(SELF, Level.FINE, ft.getMessage(), ft.getThrowable()); +- } +- } +- +- /** +- * Log an exception (throwable) at level FINE with an accompanying message. +- * +- * @param msg +- * the message accompanying the exception +- * @param t +- * the exception (throwable) to log +- */ +- public void debug(String msg, Throwable t) { +- if (logger.isLoggable(Level.FINE)) { +- log(SELF, Level.FINE, msg, t); +- } +- } +- +- /** +- * Is this logger instance enabled for the INFO level? +- * +- * @return True if this Logger is enabled for the INFO level, false otherwise. +- */ +- public boolean isInfoEnabled() { +- return logger.isLoggable(Level.INFO); +- } +- +- /** +- * Log a message object at the INFO level. +- * +- * @param msg +- * - the message object to be logged +- */ +- public void info(String msg) { +- if (logger.isLoggable(Level.INFO)) { +- log(SELF, Level.INFO, msg, null); +- } +- } +- +- /** +- * Log a message at level INFO according to the specified format and argument. +- * +- *

+- * This form avoids superfluous object creation when the logger is disabled +- * for the INFO level. +- *

+- * +- * @param format +- * the format string +- * @param arg +- * the argument +- */ +- public void info(String format, Object arg) { +- if (logger.isLoggable(Level.INFO)) { +- FormattingTuple ft = MessageFormatter.format(format, arg); +- log(SELF, Level.INFO, ft.getMessage(), ft.getThrowable()); +- } +- } +- +- /** +- * Log a message at the INFO level according to the specified format and +- * arguments. +- * +- *

+- * This form avoids superfluous object creation when the logger is disabled +- * for the INFO level. +- *

+- * +- * @param format +- * the format string +- * @param arg1 +- * the first argument +- * @param arg2 +- * the second argument +- */ +- public void info(String format, Object arg1, Object arg2) { +- if (logger.isLoggable(Level.INFO)) { +- FormattingTuple ft = MessageFormatter.format(format, arg1, arg2); +- log(SELF, Level.INFO, ft.getMessage(), ft.getThrowable()); +- } +- } +- +- /** +- * Log a message at level INFO according to the specified format and +- * arguments. +- * +- *

+- * This form avoids superfluous object creation when the logger is disabled +- * for the INFO level. +- *

+- * +- * @param format +- * the format string +- * @param argArray +- * an array of arguments +- */ +- public void info(String format, Object... argArray) { +- if (logger.isLoggable(Level.INFO)) { +- FormattingTuple ft = MessageFormatter.arrayFormat(format, argArray); +- log(SELF, Level.INFO, ft.getMessage(), ft.getThrowable()); +- } +- } +- +- /** +- * Log an exception (throwable) at the INFO level with an accompanying +- * message. +- * +- * @param msg +- * the message accompanying the exception +- * @param t +- * the exception (throwable) to log +- */ +- public void info(String msg, Throwable t) { +- if (logger.isLoggable(Level.INFO)) { +- log(SELF, Level.INFO, msg, t); +- } +- } +- +- /** +- * Is this logger instance enabled for the WARNING level? +- * +- * @return True if this Logger is enabled for the WARNING level, false +- * otherwise. +- */ +- public boolean isWarnEnabled() { +- return logger.isLoggable(Level.WARNING); +- } +- +- /** +- * Log a message object at the WARNING level. +- * +- * @param msg +- * - the message object to be logged +- */ +- public void warn(String msg) { +- if (logger.isLoggable(Level.WARNING)) { +- log(SELF, Level.WARNING, msg, null); +- } +- } +- +- /** +- * Log a message at the WARNING level according to the specified format and +- * argument. +- * +- *

+- * This form avoids superfluous object creation when the logger is disabled +- * for the WARNING level. +- *

+- * +- * @param format +- * the format string +- * @param arg +- * the argument +- */ +- public void warn(String format, Object arg) { +- if (logger.isLoggable(Level.WARNING)) { +- FormattingTuple ft = MessageFormatter.format(format, arg); +- log(SELF, Level.WARNING, ft.getMessage(), ft.getThrowable()); +- } +- } +- +- /** +- * Log a message at the WARNING level according to the specified format and +- * arguments. +- * +- *

+- * This form avoids superfluous object creation when the logger is disabled +- * for the WARNING level. +- *

+- * +- * @param format +- * the format string +- * @param arg1 +- * the first argument +- * @param arg2 +- * the second argument +- */ +- public void warn(String format, Object arg1, Object arg2) { +- if (logger.isLoggable(Level.WARNING)) { +- FormattingTuple ft = MessageFormatter.format(format, arg1, arg2); +- log(SELF, Level.WARNING, ft.getMessage(), ft.getThrowable()); +- } +- } +- +- /** +- * Log a message at level WARNING according to the specified format and +- * arguments. +- * +- *

+- * This form avoids superfluous object creation when the logger is disabled +- * for the WARNING level. +- *

+- * +- * @param format +- * the format string +- * @param argArray +- * an array of arguments +- */ +- public void warn(String format, Object... argArray) { +- if (logger.isLoggable(Level.WARNING)) { +- FormattingTuple ft = MessageFormatter.arrayFormat(format, argArray); +- log(SELF, Level.WARNING, ft.getMessage(), ft.getThrowable()); +- } +- } +- +- /** +- * Log an exception (throwable) at the WARNING level with an accompanying +- * message. +- * +- * @param msg +- * the message accompanying the exception +- * @param t +- * the exception (throwable) to log +- */ +- public void warn(String msg, Throwable t) { +- if (logger.isLoggable(Level.WARNING)) { +- log(SELF, Level.WARNING, msg, t); +- } +- } +- +- /** +- * Is this logger instance enabled for level SEVERE? +- * +- * @return True if this Logger is enabled for level SEVERE, false otherwise. +- */ +- public boolean isErrorEnabled() { +- return logger.isLoggable(Level.SEVERE); +- } +- +- /** +- * Log a message object at the SEVERE level. +- * +- * @param msg +- * - the message object to be logged +- */ +- public void error(String msg) { +- if (logger.isLoggable(Level.SEVERE)) { +- log(SELF, Level.SEVERE, msg, null); +- } +- } +- +- /** +- * Log a message at the SEVERE level according to the specified format and +- * argument. +- * +- *

+- * This form avoids superfluous object creation when the logger is disabled +- * for the SEVERE level. +- *

+- * +- * @param format +- * the format string +- * @param arg +- * the argument +- */ +- public void error(String format, Object arg) { +- if (logger.isLoggable(Level.SEVERE)) { +- FormattingTuple ft = MessageFormatter.format(format, arg); +- log(SELF, Level.SEVERE, ft.getMessage(), ft.getThrowable()); +- } +- } +- +- /** +- * Log a message at the SEVERE level according to the specified format and +- * arguments. +- * +- *

+- * This form avoids superfluous object creation when the logger is disabled +- * for the SEVERE level. +- *

+- * +- * @param format +- * the format string +- * @param arg1 +- * the first argument +- * @param arg2 +- * the second argument +- */ +- public void error(String format, Object arg1, Object arg2) { +- if (logger.isLoggable(Level.SEVERE)) { +- FormattingTuple ft = MessageFormatter.format(format, arg1, arg2); +- log(SELF, Level.SEVERE, ft.getMessage(), ft.getThrowable()); +- } +- } +- +- /** +- * Log a message at level SEVERE according to the specified format and +- * arguments. +- * +- *

+- * This form avoids superfluous object creation when the logger is disabled +- * for the SEVERE level. +- *

+- * +- * @param format +- * the format string +- * @param arguments +- * an array of arguments +- */ +- public void error(String format, Object... arguments) { +- if (logger.isLoggable(Level.SEVERE)) { +- FormattingTuple ft = MessageFormatter.arrayFormat(format, arguments); +- log(SELF, Level.SEVERE, ft.getMessage(), ft.getThrowable()); +- } +- } +- +- /** +- * Log an exception (throwable) at the SEVERE level with an accompanying +- * message. +- * +- * @param msg +- * the message accompanying the exception +- * @param t +- * the exception (throwable) to log +- */ +- public void error(String msg, Throwable t) { +- if (logger.isLoggable(Level.SEVERE)) { +- log(SELF, Level.SEVERE, msg, t); +- } +- } +- +- /** +- * Log the message at the specified level with the specified throwable if any. +- * This method creates a LogRecord and fills in caller date before calling +- * this instance's JDK14 logger. +- * +- * See bug report #13 for more details. +- * +- * @param level +- * @param msg +- * @param t +- */ +- private void log(String callerFQCN, Level level, String msg, Throwable t) { +- // millis and thread are filled by the constructor +- LogRecord record = new LogRecord(level, msg); +- record.setLoggerName(getName()); +- record.setThrown(t); +- // Note: parameters in record are not set because SLF4J only +- // supports a single formatting style +- fillCallerData(callerFQCN, record); +- logger.log(record); +- } +- +- static String SELF = JDK14LoggerAdapter.class.getName(); +- static String SUPER = MarkerIgnoringBase.class.getName(); +- +- /** +- * Fill in caller data if possible. +- * +- * @param record +- * The record to update +- */ +- final private void fillCallerData(String callerFQCN, LogRecord record) { +- StackTraceElement[] steArray = new Throwable().getStackTrace(); +- +- int selfIndex = -1; +- for (int i = 0; i < steArray.length; i++) { +- final String className = steArray[i].getClassName(); +- if (className.equals(callerFQCN) || className.equals(SUPER)) { +- selfIndex = i; +- break; +- } +- } +- +- int found = -1; +- for (int i = selfIndex + 1; i < steArray.length; i++) { +- final String className = steArray[i].getClassName(); +- if (!(className.equals(callerFQCN) || className.equals(SUPER))) { +- found = i; +- break; +- } +- } +- +- if (found != -1) { +- StackTraceElement ste = steArray[found]; +- // setting the class name has the side effect of setting +- // the needToInferCaller variable to false. +- record.setSourceClassName(ste.getClassName()); +- record.setSourceMethodName(ste.getMethodName()); +- } +- } +- +- public void log(Marker marker, String callerFQCN, int level, String message, Object[] argArray, Throwable t) { +- Level julLevel = slf4jLevelIntToJULLevel(level); +- // the logger.isLoggable check avoids the unconditional +- // construction of location data for disabled log +- // statements. As of 2008-07-31, callers of this method +- // do not perform this check. See also +- // http://jira.qos.ch/browse/SLF4J-81 +- if (logger.isLoggable(julLevel)) { +- log(callerFQCN, julLevel, message, t); +- } +- } +- +- private Level slf4jLevelIntToJULLevel(int slf4jLevelInt) { +- Level julLevel; +- switch (slf4jLevelInt) { +- case LocationAwareLogger.TRACE_INT: +- julLevel = Level.FINEST; +- break; +- case LocationAwareLogger.DEBUG_INT: +- julLevel = Level.FINE; +- break; +- case LocationAwareLogger.INFO_INT: +- julLevel = Level.INFO; +- break; +- case LocationAwareLogger.WARN_INT: +- julLevel = Level.WARNING; +- break; +- case LocationAwareLogger.ERROR_INT: +- julLevel = Level.SEVERE; +- break; +- default: +- throw new IllegalStateException("Level number " + slf4jLevelInt + " is not recognized."); +- } +- return julLevel; +- } +- +- /** +- * @since 1.7.15 +- */ +- public void log(LoggingEvent event) { +- Level julLevel = slf4jLevelIntToJULLevel(event.getLevel().toInt()); +- if (logger.isLoggable(julLevel)) { +- LogRecord record = eventToRecord(event, julLevel); +- logger.log(record); +- } +- } +- +- private LogRecord eventToRecord(LoggingEvent event, Level julLevel) { +- String format = event.getMessage(); +- Object[] arguments = event.getArgumentArray(); +- FormattingTuple ft = MessageFormatter.arrayFormat(format, arguments); +- if (ft.getThrowable() != null && event.getThrowable() != null) { +- throw new IllegalArgumentException("both last element in argument array and last argument are of type Throwable"); +- } +- +- Throwable t = event.getThrowable(); +- if (ft.getThrowable() != null) { +- t = ft.getThrowable(); +- throw new IllegalStateException("fix above code"); +- } +- +- LogRecord record = new LogRecord(julLevel, ft.getMessage()); +- record.setLoggerName(event.getLoggerName()); +- record.setMillis(event.getTimeStamp()); +- record.setSourceClassName(EventConstants.NA_SUBST); +- record.setSourceMethodName(EventConstants.NA_SUBST); +- +- record.setThrown(t); +- return record; +- } +-} +diff --git a/slf4j/src/main/java/org/slf4j/impl/JDK14LoggerFactory.java b/slf4j/src/main/java/org/slf4j/impl/JDK14LoggerFactory.java +deleted file mode 100644 +index 2d6eaaf8..00000000 +--- a/slf4j/src/main/java/org/slf4j/impl/JDK14LoggerFactory.java ++++ /dev/null +@@ -1,73 +0,0 @@ +-/** +- * Copyright (c) 2004-2011 QOS.ch +- * All rights reserved. +- * +- * Permission is hereby granted, free of charge, to any person obtaining +- * a copy of this software and associated documentation files (the +- * "Software"), to deal in the Software without restriction, including +- * without limitation the rights to use, copy, modify, merge, publish, +- * distribute, sublicense, and/or sell copies of the Software, and to +- * permit persons to whom the Software is furnished to do so, subject to +- * the following conditions: +- * +- * The above copyright notice and this permission notice shall be +- * included in all copies or substantial portions of the Software. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +- * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +- * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +- * +- */ +-package org.slf4j.impl; +- +-import org.slf4j.Logger; +-import org.slf4j.ILoggerFactory; +- +-import java.util.concurrent.ConcurrentHashMap; +-import java.util.concurrent.ConcurrentMap; +- +-/** +- * JDK14LoggerFactory is an implementation of {@link ILoggerFactory} returning +- * the appropriately named {@link JDK14LoggerAdapter} instance. +- * +- * @author Ceki Gülcü +- */ +-public class JDK14LoggerFactory implements ILoggerFactory { +- +- // key: name (String), value: a JDK14LoggerAdapter; +- ConcurrentMap loggerMap; +- public static java.util.logging.Logger LOGGER; // BungeeCord +- +- public JDK14LoggerFactory() { +- loggerMap = new ConcurrentHashMap(); +- // ensure jul initialization. see SLF4J-359 +- // note that call to java.util.logging.LogManager.getLogManager() fails on the Google App Engine platform. See SLF4J-363 +- java.util.logging.Logger.getLogger(""); +- } +- +- /* +- * (non-Javadoc) +- * +- * @see org.slf4j.ILoggerFactory#getLogger(java.lang.String) +- */ +- public Logger getLogger(String name) { +- // the root logger is called "" in JUL +- if (name.equalsIgnoreCase(Logger.ROOT_LOGGER_NAME)) { +- name = ""; +- } +- +- Logger slf4jLogger = loggerMap.get(name); +- if (slf4jLogger != null) +- return slf4jLogger; +- else { +- java.util.logging.Logger julLogger = LOGGER; // BungeeCord - TODO: per-plugin loggers +- Logger newInstance = new JDK14LoggerAdapter(julLogger); +- Logger oldInstance = loggerMap.putIfAbsent(name, newInstance); +- return oldInstance == null ? newInstance : oldInstance; +- } +- } +-} +diff --git a/slf4j/src/main/java/org/slf4j/impl/StaticLoggerBinder.java b/slf4j/src/main/java/org/slf4j/impl/StaticLoggerBinder.java +deleted file mode 100644 +index ebf8ae11..00000000 +--- a/slf4j/src/main/java/org/slf4j/impl/StaticLoggerBinder.java ++++ /dev/null +@@ -1,80 +0,0 @@ +-/** +- * Copyright (c) 2004-2011 QOS.ch +- * All rights reserved. +- * +- * Permission is hereby granted, free of charge, to any person obtaining +- * a copy of this software and associated documentation files (the +- * "Software"), to deal in the Software without restriction, including +- * without limitation the rights to use, copy, modify, merge, publish, +- * distribute, sublicense, and/or sell copies of the Software, and to +- * permit persons to whom the Software is furnished to do so, subject to +- * the following conditions: +- * +- * The above copyright notice and this permission notice shall be +- * included in all copies or substantial portions of the Software. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +- * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +- * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +- * +- */ +-package org.slf4j.impl; +- +-import org.slf4j.ILoggerFactory; +-import org.slf4j.LoggerFactory; +-import org.slf4j.spi.LoggerFactoryBinder; +- +-/** +- * The binding of {@link LoggerFactory} class with an actual instance of +- * {@link ILoggerFactory} is performed using information returned by this class. +- * +- * @author Ceki Gülcü +- */ +-public class StaticLoggerBinder implements LoggerFactoryBinder { +- +- /** +- * The unique instance of this class. +- * +- */ +- private static final StaticLoggerBinder SINGLETON = new StaticLoggerBinder(); +- +- /** +- * Return the singleton of this class. +- * +- * @return the StaticLoggerBinder singleton +- */ +- public static final StaticLoggerBinder getSingleton() { +- return SINGLETON; +- } +- +- /** +- * Declare the version of the SLF4J API this implementation is compiled against. +- * The value of this field is modified with each major release. +- */ +- // to avoid constant folding by the compiler, this field must *not* be final +- public static String REQUESTED_API_VERSION = "1.6.99"; // !final +- +- private static final String loggerFactoryClassStr = org.slf4j.impl.JDK14LoggerFactory.class.getName(); +- +- /** The ILoggerFactory instance returned by the {@link #getLoggerFactory} method +- * should always be the same object +- */ +- private final ILoggerFactory loggerFactory; +- +- private StaticLoggerBinder() { +- // Note: JCL gets substituted at build time by an appropriate Ant task +- loggerFactory = new org.slf4j.impl.JDK14LoggerFactory(); +- } +- +- public ILoggerFactory getLoggerFactory() { +- return loggerFactory; +- } +- +- public String getLoggerFactoryClassStr() { +- return loggerFactoryClassStr; +- } +-} +diff --git a/slf4j/src/main/java/org/slf4j/impl/StaticMDCBinder.java b/slf4j/src/main/java/org/slf4j/impl/StaticMDCBinder.java +deleted file mode 100644 +index 0a1dcb4c..00000000 +--- a/slf4j/src/main/java/org/slf4j/impl/StaticMDCBinder.java ++++ /dev/null +@@ -1,68 +0,0 @@ +-/** +- * Copyright (c) 2004-2011 QOS.ch +- * All rights reserved. +- * +- * Permission is hereby granted, free of charge, to any person obtaining +- * a copy of this software and associated documentation files (the +- * "Software"), to deal in the Software without restriction, including +- * without limitation the rights to use, copy, modify, merge, publish, +- * distribute, sublicense, and/or sell copies of the Software, and to +- * permit persons to whom the Software is furnished to do so, subject to +- * the following conditions: +- * +- * The above copyright notice and this permission notice shall be +- * included in all copies or substantial portions of the Software. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +- * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +- * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +- * +- */ +-package org.slf4j.impl; +- +-import org.slf4j.helpers.BasicMDCAdapter; +-import org.slf4j.spi.MDCAdapter; +- +-/** +- * This implementation is bound to {@link BasicMDCAdapter}. +- * +- * @author Ceki Gülcü +- */ +-public class StaticMDCBinder { +- +- /** +- * The unique instance of this class. +- */ +- public static final StaticMDCBinder SINGLETON = new StaticMDCBinder(); +- +- private StaticMDCBinder() { +- } +- +- /** +- * Return the singleton of this class. +- * +- * @return the StaticMDCBinder singleton +- * @since 1.7.14 +- */ +- public static final StaticMDCBinder getSingleton() { +- return SINGLETON; +- } +- +- /** +- * Currently this method always returns an instance of +- * {@link BasicMDCAdapter}. +- */ +- public MDCAdapter getMDCA() { +- // note that this method is invoked only from within the static initializer of +- // the org.slf4j.MDC class. +- return new BasicMDCAdapter(); +- } +- +- public String getMDCAdapterClassStr() { +- return BasicMDCAdapter.class.getName(); +- } +-} +diff --git a/slf4j/src/main/java/org/slf4j/impl/StaticMarkerBinder.java b/slf4j/src/main/java/org/slf4j/impl/StaticMarkerBinder.java +deleted file mode 100644 +index 21a48df6..00000000 +--- a/slf4j/src/main/java/org/slf4j/impl/StaticMarkerBinder.java ++++ /dev/null +@@ -1,77 +0,0 @@ +-/** +- * Copyright (c) 2004-2011 QOS.ch +- * All rights reserved. +- * +- * Permission is hereby granted, free of charge, to any person obtaining +- * a copy of this software and associated documentation files (the +- * "Software"), to deal in the Software without restriction, including +- * without limitation the rights to use, copy, modify, merge, publish, +- * distribute, sublicense, and/or sell copies of the Software, and to +- * permit persons to whom the Software is furnished to do so, subject to +- * the following conditions: +- * +- * The above copyright notice and this permission notice shall be +- * included in all copies or substantial portions of the Software. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +- * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +- * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +- * +- */ +-package org.slf4j.impl; +- +-import org.slf4j.IMarkerFactory; +-import org.slf4j.MarkerFactory; +-import org.slf4j.helpers.BasicMarkerFactory; +-import org.slf4j.spi.MarkerFactoryBinder; +- +-/** +- * +- * The binding of {@link MarkerFactory} class with an actual instance of +- * {@link IMarkerFactory} is performed using information returned by this class. +- * +- * @author Ceki Gülcü +- */ +-public class StaticMarkerBinder implements MarkerFactoryBinder { +- +- /** +- * The unique instance of this class. +- */ +- public static final StaticMarkerBinder SINGLETON = new StaticMarkerBinder(); +- +- final IMarkerFactory markerFactory = new BasicMarkerFactory(); +- +- private StaticMarkerBinder() { +- } +- +- /** +- * Return the singleton of this class. +- * +- * @return the StaticMarkerBinder singleton +- * @since 1.7.14 +- */ +- public static StaticMarkerBinder getSingleton() { +- return SINGLETON; +- } +- +- /** +- * Currently this method always returns an instance of +- * {@link BasicMarkerFactory}. +- */ +- public IMarkerFactory getMarkerFactory() { +- return markerFactory; +- } +- +- /** +- * Currently, this method returns the class name of +- * {@link BasicMarkerFactory}. +- */ +- public String getMarkerFactoryClassStr() { +- return BasicMarkerFactory.class.getName(); +- } +- +-} -- -2.31.0 +2.31.1 diff --git a/BungeeCord-Patches/0043-Forge-is-a-first-class-citizen.patch b/BungeeCord-Patches/0043-Forge-is-a-first-class-citizen.patch index 603da0a..47a1846 100644 --- a/BungeeCord-Patches/0043-Forge-is-a-first-class-citizen.patch +++ b/BungeeCord-Patches/0043-Forge-is-a-first-class-citizen.patch @@ -1,14 +1,14 @@ -From 48f0ae897c372ea9a02a982991d2adda25095875 Mon Sep 17 00:00:00 2001 +From be8460146ca653b8887f7010630a4c34852bbc21 Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Mon, 28 May 2018 21:43:55 +0100 Subject: [PATCH] Forge is a first class citizen diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java -index d71556a7..289a63d5 100644 +index 617a077f..eeb63c43 100644 --- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java +++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java -@@ -280,8 +280,6 @@ public class BungeeCord extends ProxyServer +@@ -281,8 +281,6 @@ public class BungeeCord extends ProxyServer registerChannel( ForgeConstants.FML_TAG ); registerChannel( ForgeConstants.FML_HANDSHAKE_TAG ); registerChannel( ForgeConstants.FORGE_REGISTER ); @@ -31,5 +31,5 @@ index 115f614e..85d2197a 100644 @Synchronized("serversLock") // Waterfall public void load() -- -2.27.0 +2.31.1 diff --git a/BungeeCord-Patches/0046-Provide-an-option-to-disable-entity-metadata-rewriti.patch b/BungeeCord-Patches/0046-Provide-an-option-to-disable-entity-metadata-rewriti.patch index 8d460c9..fc6edb2 100644 --- a/BungeeCord-Patches/0046-Provide-an-option-to-disable-entity-metadata-rewriti.patch +++ b/BungeeCord-Patches/0046-Provide-an-option-to-disable-entity-metadata-rewriti.patch @@ -1,4 +1,4 @@ -From 8f2d534b8f40b7a4738fabb88bb4d3ed5d735e54 Mon Sep 17 00:00:00 2001 +From e2aa832097ee0d8f09cd8b84ec1a6dc11dcacebb Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Mon, 14 Jan 2019 03:35:21 +0000 Subject: [PATCH] Provide an option to disable entity metadata rewriting @@ -158,7 +158,7 @@ index 033877fc..72b6e9be 100644 } diff --git a/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap.java b/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap.java -index 509898e9..db5210d1 100644 +index 2e6cf764..13456b34 100644 --- a/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap.java +++ b/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap.java @@ -6,6 +6,7 @@ import io.netty.buffer.ByteBufInputStream; @@ -181,7 +181,7 @@ index 509898e9..db5210d1 100644 switch ( version ) { case ProtocolConstants.MINECRAFT_1_8: -@@ -284,7 +290,13 @@ public abstract class EntityMap +@@ -286,7 +292,13 @@ public abstract class EntityMap DefinedPacket.readVarInt( packet ); break; default: diff --git a/BungeeCord-Patches/0051-Speed-up-packet-construction.patch b/BungeeCord-Patches/0051-Speed-up-packet-construction.patch index fbe6eba..e000f6b 100644 --- a/BungeeCord-Patches/0051-Speed-up-packet-construction.patch +++ b/BungeeCord-Patches/0051-Speed-up-packet-construction.patch @@ -1,14 +1,14 @@ -From 25efdf442b60a21767250917e2d35da26d92372d Mon Sep 17 00:00:00 2001 +From 5933064944a64327398feb3d07ccadbdcb41b629 Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Wed, 17 Apr 2019 09:24:38 +0300 Subject: [PATCH] Speed up packet construction diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java b/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java -index 3a686e60..0dffc8d2 100644 +index c856f365..d2a11a82 100644 --- a/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java +++ b/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java -@@ -54,6 +54,7 @@ public enum Protocol +@@ -57,6 +57,7 @@ public enum Protocol { TO_SERVER.registerPacket( Handshake.class, @@ -16,7 +16,7 @@ index 3a686e60..0dffc8d2 100644 map( ProtocolConstants.MINECRAFT_1_8, 0x00 ) ); } -@@ -65,6 +66,7 @@ public enum Protocol +@@ -68,6 +69,7 @@ public enum Protocol { TO_CLIENT.registerPacket( KeepAlive.class, @@ -24,7 +24,7 @@ index 3a686e60..0dffc8d2 100644 map( ProtocolConstants.MINECRAFT_1_8, 0x00 ), map( ProtocolConstants.MINECRAFT_1_9, 0x1F ), map( ProtocolConstants.MINECRAFT_1_13, 0x21 ), -@@ -75,6 +77,7 @@ public enum Protocol +@@ -79,6 +81,7 @@ public enum Protocol ); TO_CLIENT.registerPacket( Login.class, @@ -32,7 +32,7 @@ index 3a686e60..0dffc8d2 100644 map( ProtocolConstants.MINECRAFT_1_8, 0x01 ), map( ProtocolConstants.MINECRAFT_1_9, 0x23 ), map( ProtocolConstants.MINECRAFT_1_13, 0x25 ), -@@ -84,6 +87,7 @@ public enum Protocol +@@ -89,6 +92,7 @@ public enum Protocol ); TO_CLIENT.registerPacket( Chat.class, @@ -40,7 +40,7 @@ index 3a686e60..0dffc8d2 100644 map( ProtocolConstants.MINECRAFT_1_8, 0x02 ), map( ProtocolConstants.MINECRAFT_1_9, 0x0F ), map( ProtocolConstants.MINECRAFT_1_13, 0x0E ), -@@ -92,6 +96,7 @@ public enum Protocol +@@ -98,6 +102,7 @@ public enum Protocol ); TO_CLIENT.registerPacket( Respawn.class, @@ -48,15 +48,15 @@ index 3a686e60..0dffc8d2 100644 map( ProtocolConstants.MINECRAFT_1_8, 0x07 ), map( ProtocolConstants.MINECRAFT_1_9, 0x33 ), map( ProtocolConstants.MINECRAFT_1_12, 0x34 ), -@@ -104,6 +109,7 @@ public enum Protocol +@@ -111,6 +116,7 @@ public enum Protocol ); TO_CLIENT.registerPacket( BossBar.class, + BossBar::new, // Waterfall - speed up packet construction map( ProtocolConstants.MINECRAFT_1_9, 0x0C ), map( ProtocolConstants.MINECRAFT_1_15, 0x0D ), - map( ProtocolConstants.MINECRAFT_1_16, 0x0C ) -@@ -111,17 +117,20 @@ public enum Protocol + map( ProtocolConstants.MINECRAFT_1_16, 0x0C ), +@@ -119,17 +125,20 @@ public enum Protocol // Waterfall start TO_CLIENT.registerPacket( EntityEffect.class, @@ -77,7 +77,7 @@ index 3a686e60..0dffc8d2 100644 map( ProtocolConstants.MINECRAFT_1_8, 0x38 ), map( ProtocolConstants.MINECRAFT_1_9, 0x2D ), map( ProtocolConstants.MINECRAFT_1_12_1, 0x2E ), -@@ -133,6 +142,7 @@ public enum Protocol +@@ -142,6 +151,7 @@ public enum Protocol ); TO_CLIENT.registerPacket( TabCompleteResponse.class, @@ -85,7 +85,7 @@ index 3a686e60..0dffc8d2 100644 map( ProtocolConstants.MINECRAFT_1_8, 0x3A ), map( ProtocolConstants.MINECRAFT_1_9, 0x0E ), map( ProtocolConstants.MINECRAFT_1_13, 0x10 ), -@@ -142,6 +152,7 @@ public enum Protocol +@@ -152,6 +162,7 @@ public enum Protocol ); TO_CLIENT.registerPacket( ScoreboardObjective.class, @@ -93,7 +93,7 @@ index 3a686e60..0dffc8d2 100644 map( ProtocolConstants.MINECRAFT_1_8, 0x3B ), map( ProtocolConstants.MINECRAFT_1_9, 0x3F ), map( ProtocolConstants.MINECRAFT_1_12, 0x41 ), -@@ -152,6 +163,7 @@ public enum Protocol +@@ -163,6 +174,7 @@ public enum Protocol ); TO_CLIENT.registerPacket( ScoreboardScore.class, @@ -101,7 +101,7 @@ index 3a686e60..0dffc8d2 100644 map( ProtocolConstants.MINECRAFT_1_8, 0x3C ), map( ProtocolConstants.MINECRAFT_1_9, 0x42 ), map( ProtocolConstants.MINECRAFT_1_12, 0x44 ), -@@ -162,6 +174,7 @@ public enum Protocol +@@ -174,6 +186,7 @@ public enum Protocol ); TO_CLIENT.registerPacket( ScoreboardDisplay.class, @@ -109,7 +109,7 @@ index 3a686e60..0dffc8d2 100644 map( ProtocolConstants.MINECRAFT_1_8, 0x3D ), map( ProtocolConstants.MINECRAFT_1_9, 0x38 ), map( ProtocolConstants.MINECRAFT_1_12, 0x3A ), -@@ -172,6 +185,7 @@ public enum Protocol +@@ -185,6 +198,7 @@ public enum Protocol ); TO_CLIENT.registerPacket( Team.class, @@ -117,7 +117,7 @@ index 3a686e60..0dffc8d2 100644 map( ProtocolConstants.MINECRAFT_1_8, 0x3E ), map( ProtocolConstants.MINECRAFT_1_9, 0x41 ), map( ProtocolConstants.MINECRAFT_1_12, 0x43 ), -@@ -182,6 +196,7 @@ public enum Protocol +@@ -196,6 +210,7 @@ public enum Protocol ); TO_CLIENT.registerPacket( PluginMessage.class, @@ -125,7 +125,7 @@ index 3a686e60..0dffc8d2 100644 map( ProtocolConstants.MINECRAFT_1_8, 0x3F ), map( ProtocolConstants.MINECRAFT_1_9, 0x18 ), map( ProtocolConstants.MINECRAFT_1_13, 0x19 ), -@@ -192,6 +207,7 @@ public enum Protocol +@@ -207,6 +222,7 @@ public enum Protocol ); TO_CLIENT.registerPacket( Kick.class, @@ -133,7 +133,7 @@ index 3a686e60..0dffc8d2 100644 map( ProtocolConstants.MINECRAFT_1_8, 0x40 ), map( ProtocolConstants.MINECRAFT_1_9, 0x1A ), map( ProtocolConstants.MINECRAFT_1_13, 0x1B ), -@@ -202,6 +218,7 @@ public enum Protocol +@@ -218,6 +234,7 @@ public enum Protocol ); TO_CLIENT.registerPacket( Title.class, @@ -141,7 +141,7 @@ index 3a686e60..0dffc8d2 100644 map( ProtocolConstants.MINECRAFT_1_8, 0x45 ), map( ProtocolConstants.MINECRAFT_1_12, 0x47 ), map( ProtocolConstants.MINECRAFT_1_12_1, 0x48 ), -@@ -212,6 +229,7 @@ public enum Protocol +@@ -239,6 +256,7 @@ public enum Protocol ); TO_CLIENT.registerPacket( PlayerListHeaderFooter.class, @@ -149,7 +149,7 @@ index 3a686e60..0dffc8d2 100644 map( ProtocolConstants.MINECRAFT_1_8, 0x47 ), map( ProtocolConstants.MINECRAFT_1_9, 0x48 ), map( ProtocolConstants.MINECRAFT_1_9_4, 0x47 ), -@@ -224,6 +242,7 @@ public enum Protocol +@@ -252,6 +270,7 @@ public enum Protocol ); TO_CLIENT.registerPacket( EntityStatus.class, @@ -157,7 +157,7 @@ index 3a686e60..0dffc8d2 100644 map( ProtocolConstants.MINECRAFT_1_8, 0x1A ), map( ProtocolConstants.MINECRAFT_1_9, 0x1B ), map( ProtocolConstants.MINECRAFT_1_13, 0x1C ), -@@ -234,6 +253,7 @@ public enum Protocol +@@ -263,6 +282,7 @@ public enum Protocol ); TO_CLIENT.registerPacket( Commands.class, @@ -165,22 +165,23 @@ index 3a686e60..0dffc8d2 100644 map( ProtocolConstants.MINECRAFT_1_13, 0x11 ), map( ProtocolConstants.MINECRAFT_1_15, 0x12 ), map( ProtocolConstants.MINECRAFT_1_16, 0x11 ), -@@ -241,12 +261,14 @@ public enum Protocol +@@ -271,6 +291,7 @@ public enum Protocol ); TO_CLIENT.registerPacket( GameState.class, + GameState::new, // Waterfall - speed up packet construction map( ProtocolConstants.MINECRAFT_1_15, 0x1F ), map( ProtocolConstants.MINECRAFT_1_16, 0x1E ), - map( ProtocolConstants.MINECRAFT_1_16_2, 0x1D ) + map( ProtocolConstants.MINECRAFT_1_16_2, 0x1D ), +@@ -278,6 +299,7 @@ public enum Protocol ); TO_CLIENT.registerPacket( ViewDistance.class, + ViewDistance::new, // Waterfall - speed up packet construction map( ProtocolConstants.MINECRAFT_1_14, 0x41 ), map( ProtocolConstants.MINECRAFT_1_15, 0x42 ), - map( ProtocolConstants.MINECRAFT_1_16, 0x41 ) -@@ -254,6 +276,7 @@ public enum Protocol + map( ProtocolConstants.MINECRAFT_1_16, 0x41 ), +@@ -286,6 +308,7 @@ public enum Protocol TO_SERVER.registerPacket( KeepAlive.class, @@ -188,7 +189,7 @@ index 3a686e60..0dffc8d2 100644 map( ProtocolConstants.MINECRAFT_1_8, 0x00 ), map( ProtocolConstants.MINECRAFT_1_9, 0x0B ), map( ProtocolConstants.MINECRAFT_1_12, 0x0C ), -@@ -264,6 +287,7 @@ public enum Protocol +@@ -297,6 +320,7 @@ public enum Protocol ); TO_SERVER.registerPacket( Chat.class, @@ -196,7 +197,7 @@ index 3a686e60..0dffc8d2 100644 map( ProtocolConstants.MINECRAFT_1_8, 0x01 ), map( ProtocolConstants.MINECRAFT_1_9, 0x02 ), map( ProtocolConstants.MINECRAFT_1_12, 0x03 ), -@@ -272,6 +296,7 @@ public enum Protocol +@@ -305,6 +329,7 @@ public enum Protocol ); TO_SERVER.registerPacket( TabCompleteRequest.class, @@ -204,7 +205,7 @@ index 3a686e60..0dffc8d2 100644 map( ProtocolConstants.MINECRAFT_1_8, 0x14 ), map( ProtocolConstants.MINECRAFT_1_9, 0x01 ), map( ProtocolConstants.MINECRAFT_1_12, 0x02 ), -@@ -281,6 +306,7 @@ public enum Protocol +@@ -314,6 +339,7 @@ public enum Protocol ); TO_SERVER.registerPacket( ClientSettings.class, @@ -212,7 +213,7 @@ index 3a686e60..0dffc8d2 100644 map( ProtocolConstants.MINECRAFT_1_8, 0x15 ), map( ProtocolConstants.MINECRAFT_1_9, 0x04 ), map( ProtocolConstants.MINECRAFT_1_12, 0x05 ), -@@ -289,6 +315,7 @@ public enum Protocol +@@ -322,6 +348,7 @@ public enum Protocol ); TO_SERVER.registerPacket( PluginMessage.class, @@ -220,7 +221,7 @@ index 3a686e60..0dffc8d2 100644 map( ProtocolConstants.MINECRAFT_1_8, 0x17 ), map( ProtocolConstants.MINECRAFT_1_9, 0x09 ), map( ProtocolConstants.MINECRAFT_1_12, 0x0A ), -@@ -305,19 +332,23 @@ public enum Protocol +@@ -339,19 +366,23 @@ public enum Protocol { TO_CLIENT.registerPacket( StatusResponse.class, @@ -244,7 +245,7 @@ index 3a686e60..0dffc8d2 100644 map( ProtocolConstants.MINECRAFT_1_8, 0x01 ) ); } -@@ -329,35 +360,43 @@ public enum Protocol +@@ -363,35 +394,43 @@ public enum Protocol { TO_CLIENT.registerPacket( Kick.class, @@ -288,7 +289,7 @@ index 3a686e60..0dffc8d2 100644 map( ProtocolConstants.MINECRAFT_1_13, 0x02 ) ); } -@@ -408,7 +447,7 @@ public enum Protocol +@@ -442,7 +481,7 @@ public enum Protocol private final int protocolVersion; private final TObjectIntMap> packetMap = new TObjectIntHashMap<>( MAX_PACKET_ID ); @@ -297,7 +298,7 @@ index 3a686e60..0dffc8d2 100644 } @Data -@@ -476,21 +515,24 @@ public enum Protocol +@@ -510,21 +549,24 @@ public enum Protocol throw new BadPacketException( "Packet with id " + id + " outside of range " ); } @@ -326,7 +327,7 @@ index 3a686e60..0dffc8d2 100644 int mappingIndex = 0; ProtocolMapping mapping = mappings[mappingIndex]; -@@ -521,11 +563,32 @@ public enum Protocol +@@ -555,11 +597,32 @@ public enum Protocol data.packetConstructors[mapping.packetID] = constructor; } // Waterfall } diff --git a/BungeeCord-Patches/0054-Add-exception-reporting-event.patch b/BungeeCord-Patches/0054-Add-exception-reporting-event.patch index 582b38a..2d98a7f 100644 --- a/BungeeCord-Patches/0054-Add-exception-reporting-event.patch +++ b/BungeeCord-Patches/0054-Add-exception-reporting-event.patch @@ -1,4 +1,4 @@ -From a570cc8c9e2ad578c6fa489b745c98220c33de96 Mon Sep 17 00:00:00 2001 +From b498c27f2197205ed7acb59939a6d1eeeef818e8 Mon Sep 17 00:00:00 2001 From: theminecoder Date: Wed, 22 Apr 2020 14:00:44 +1000 Subject: [PATCH] Add exception reporting event @@ -642,7 +642,7 @@ index fbfbd546..ae85a1d4 100644 @EventHandler diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java -index 289a63d5..2938f2f1 100644 +index eeb63c43..c09f5b4c 100644 --- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java +++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java @@ -11,6 +11,8 @@ import com.google.gson.Gson; @@ -654,7 +654,7 @@ index 289a63d5..2938f2f1 100644 import io.netty.bootstrap.ServerBootstrap; import io.netty.channel.Channel; import io.netty.channel.ChannelException; -@@ -475,7 +477,11 @@ public class BungeeCord extends ProxyServer +@@ -476,7 +478,11 @@ public class BungeeCord extends ProxyServer } } catch ( Throwable t ) { @@ -695,5 +695,5 @@ index 67db0cc4..02ec98fc 100644 // If we have a period of 0 or less, only run once -- -2.31.0 +2.31.1