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:
a52ea500 #2769: Guardian target beam lost on server change
17d5dd3f Add dist Maven profile to generate source and Javadoc jars
9e8ab747 Add JsonConfiguration support to bungeecord-config
cdacc0b1 #2498: Add ServerConnectRequest accessor in ServerConnectEvent.
b4b998b2 #2761: Add ClientConnectEvent
This commit is contained in:
Shane Freeder 2020-02-10 22:39:19 +00:00
parent cca83dfaf6
commit 17d5b78fdd
No known key found for this signature in database
GPG Key ID: A3F61EA5A085289C
9 changed files with 125 additions and 70 deletions

@ -1 +1 @@
Subproject commit a3ab2bf58e87f7ebc9131b1b969ce918986d9cbd
Subproject commit a52ea50006ef8d1fb2388a25d4a5986f197bdb8a

View File

@ -1,4 +1,4 @@
From 54b91cd62efdce89489199bc102a9beab569079e Mon Sep 17 00:00:00 2001
From 9e6a4af2aa2192218a0e6535d3ba7352fe47bcb9 Mon Sep 17 00:00:00 2001
From: Tux <write@imaginarycode.com>
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 5d782001..4b9e171d 100644
index a3f6a6a9..15228459 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -4,42 +4,42 @@
@ -67,10 +67,10 @@ index 5d782001..4b9e171d 100644
<scope>compile</scope>
</dependency>
diff --git a/bootstrap/pom.xml b/bootstrap/pom.xml
index 9a11e65a..9cae021d 100644
index 3e63a0bf..66ed2128 100644
--- a/bootstrap/pom.xml
+++ b/bootstrap/pom.xml
@@ -4,38 +4,39 @@
@@ -4,39 +4,40 @@
<modelVersion>4.0.0</modelVersion>
<parent>
@ -96,6 +96,7 @@ index 9a11e65a..9cae021d 100644
<properties>
<maven.deploy.skip>true</maven.deploy.skip>
<maven.javadoc.skip>true</maven.javadoc.skip>
- <maven.compiler.source>1.6</maven.compiler.source>
- <maven.compiler.target>1.6</maven.compiler.target>
+ <!-- use java 1.8, literally nobody is using 1.6-7 anymore, and, if they are, that's their own stupidity. -->
@ -121,7 +122,7 @@ index 9a11e65a..9cae021d 100644
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -44,7 +45,7 @@
@@ -45,7 +46,7 @@
<configuration>
<archive>
<manifestEntries>
@ -174,7 +175,7 @@ index 4ca669f9..0bd76ea5 100644
<dependencies>
<dependency>
diff --git a/config/pom.xml b/config/pom.xml
index 4b44d27e..764fcc6b 100644
index 95449790..4bf7237f 100644
--- a/config/pom.xml
+++ b/config/pom.xml
@@ -4,19 +4,19 @@
@ -388,7 +389,7 @@ index 875e8eb1..d8ebf472 100644
<packaging>jar</packaging>
diff --git a/module/pom.xml b/module/pom.xml
index 7c81fe86..7b05190b 100644
index 088fc997..261c8d75 100644
--- a/module/pom.xml
+++ b/module/pom.xml
@@ -4,19 +4,19 @@
@ -417,13 +418,14 @@ index 7c81fe86..7b05190b 100644
<modules>
<module>cmd-alert</module>
@@ -28,14 +28,14 @@
@@ -28,15 +28,15 @@
</modules>
<properties>
- <module.author>SpigotMC</module.author>
+ <module.author>WaterfallMC</module.author>
<maven.deploy.skip>true</maven.deploy.skip>
<maven.javadoc.skip>true</maven.javadoc.skip>
</properties>
<dependencies>
@ -489,7 +491,7 @@ index f11cad04..f8b549dc 100644
<dependencies>
<dependency>
diff --git a/pom.xml b/pom.xml
index 73b51d49..82872150 100644
index 67122278..19f63586 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,18 +3,25 @@
@ -608,12 +610,11 @@ index 73b51d49..82872150 100644
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
@@ -165,4 +199,87 @@
</plugin>
</plugins>
</build>
+
+ <profiles>
@@ -236,5 +270,87 @@
</plugins>
</build>
</profile>
+ <!-- Waterfall Start -->
+ <profile>
+ <id>deployment</id>
+ <build>
@ -694,7 +695,8 @@ index 73b51d49..82872150 100644
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+ <!-- Waterfall end -->
</profiles>
</project>
diff --git a/protocol/pom.xml b/protocol/pom.xml
index e11af008..4592e2b3 100644
@ -738,7 +740,7 @@ index e11af008..4592e2b3 100644
<scope>compile</scope>
</dependency>
diff --git a/proxy/pom.xml b/proxy/pom.xml
index 04c5af43..b525340d 100644
index a682d3c6..9ac3c1af 100644
--- a/proxy/pom.xml
+++ b/proxy/pom.xml
@@ -4,18 +4,18 @@
@ -765,7 +767,7 @@ index 04c5af43..b525340d 100644
<description>Proxy component of the Elastic Portal Suite</description>
<properties>
@@ -55,32 +55,32 @@
@@ -56,32 +56,32 @@
<scope>compile</scope>
</dependency>
<dependency>

View File

@ -1,14 +1,14 @@
From 3692953ec62a6a392c46c1bea06cc8eea0b28644 Mon Sep 17 00:00:00 2001
From 8fcf80f3a4a5fd0c9b8d096a996f8e90f803492a Mon Sep 17 00:00:00 2001
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
Date: Wed, 18 Jul 2018 20:23:03 +0300
Subject: [PATCH] Copy license files into jar
diff --git a/proxy/pom.xml b/proxy/pom.xml
index 879a82d7..03e35f42 100644
index 9ac3c1af..1e1df054 100644
--- a/proxy/pom.xml
+++ b/proxy/pom.xml
@@ -104,6 +104,20 @@
@@ -105,6 +105,20 @@
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
@ -30,5 +30,5 @@ index 879a82d7..03e35f42 100644
</build>
</project>
--
2.20.1
2.25.0

View File

@ -1,4 +1,4 @@
From bb2018d11642a88b3f04ae4efe193b3e7ea8999b Mon Sep 17 00:00:00 2001
From b2b0879209daecbd7d19e05de07a6efbd00f3ee2 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@techcable.net>
Date: Tue, 3 May 2016 20:31:52 -0700
Subject: [PATCH] Don't access a ByteBuf's underlying array
@ -69,10 +69,10 @@ index 147110e4..a2f62648 100644
// changes in the packet are ignored so we need to send it manually
con.unsafe().sendPacket( pluginMessage );
diff --git a/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java b/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
index 44e28846..c5f071f2 100644
index afc2c12a..c0f7980b 100644
--- a/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
+++ b/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
@@ -48,9 +48,9 @@ import net.md_5.bungee.protocol.Varint21LengthFieldPrepender;
@@ -49,9 +49,9 @@ import net.md_5.bungee.protocol.Varint21LengthFieldPrepender;
public class PipelineUtils
{

View File

@ -1,4 +1,4 @@
From 901946ee5647bc874fab86859c58b4ea6f4a1d83 Mon Sep 17 00:00:00 2001
From 304688eed40e4e7eaa6ba2474286972b5651b2bf Mon Sep 17 00:00:00 2001
From: Harry <me@harry5573.uk>
Date: Sun, 24 Jan 2016 15:13:29 -0700
Subject: [PATCH] Enable TCP_NODELAY.
@ -6,10 +6,10 @@ Subject: [PATCH] Enable TCP_NODELAY.
This is enabled by default on CraftBukkit/Spigot >= 1.8 and may help with network performance.
diff --git a/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java b/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
index c5f071f2..0c91f7ed 100644
index c0f7980b..8969a5ed 100644
--- a/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
+++ b/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
@@ -160,6 +160,7 @@ public class PipelineUtils
@@ -169,6 +169,7 @@ public class PipelineUtils
{
// IP_TOS is not supported (Windows XP / Windows Server 2003)
}

View File

@ -1,4 +1,4 @@
From 828f6d18bf3da33fe5e82ec3ede6d0c3452851ee Mon Sep 17 00:00:00 2001
From 8d2ad56ecddfa2089184fcd4ca92635ffee13004 Mon Sep 17 00:00:00 2001
From: Tux <write@imaginarycode.com>
Date: Wed, 21 Dec 2016 03:13:03 -0500
Subject: [PATCH] Optionally use async Netty DNS resolver
@ -24,10 +24,10 @@ index 749059ab..6141128b 100644
/**
diff --git a/proxy/pom.xml b/proxy/pom.xml
index 66561fd9..01cb5c50 100644
index 1e1df054..38392b64 100644
--- a/proxy/pom.xml
+++ b/proxy/pom.xml
@@ -41,6 +41,14 @@
@@ -42,6 +42,14 @@
<version>${netty.version}</version>
<scope>compile</scope>
</dependency>

View File

@ -1,4 +1,4 @@
From f8b721b6e23bc29ad538e02d117a4ddf561fba06 Mon Sep 17 00:00:00 2001
From 211d83d5dc9d417b84fdbaf1105b984af12acc4b Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Fri, 22 Sep 2017 12:46:47 +0200
Subject: [PATCH] Use Log4j2 for logging and TerminalConsoleAppender for
@ -6,10 +6,10 @@ Subject: [PATCH] Use Log4j2 for logging and TerminalConsoleAppender for
diff --git a/bootstrap/pom.xml b/bootstrap/pom.xml
index 9cae021d..e7b76d5b 100644
index 66ed2128..2876d8d6 100644
--- a/bootstrap/pom.xml
+++ b/bootstrap/pom.xml
@@ -48,6 +48,9 @@
@@ -49,6 +49,9 @@
<Main-Class>net.md_5.bungee.Bootstrap</Main-Class>
<Implementation-Version>${describe}</Implementation-Version>
<Specification-Version>${maven.build.timestamp}</Specification-Version>
@ -19,7 +19,7 @@ index 9cae021d..e7b76d5b 100644
</manifestEntries>
</archive>
</configuration>
@@ -75,7 +78,17 @@
@@ -76,7 +79,17 @@
</excludes>
</filter>
</filters>
@ -233,7 +233,7 @@ index 00000000..93ce3b14
+ </Loggers>
+</Configuration>
diff --git a/pom.xml b/pom.xml
index 82872150..903fd182 100644
index 19f63586..37bdaf3d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -56,6 +56,7 @@
@ -245,10 +245,10 @@ index 82872150..903fd182 100644
<module>protocol</module>
<module>proxy</module>
diff --git a/proxy/pom.xml b/proxy/pom.xml
index 01cb5c50..52e45fe1 100644
index 38392b64..54500dde 100644
--- a/proxy/pom.xml
+++ b/proxy/pom.xml
@@ -70,7 +70,7 @@
@@ -71,7 +71,7 @@
</dependency>
<dependency>
<groupId>io.github.waterfallmc</groupId>
@ -257,7 +257,7 @@ index 01cb5c50..52e45fe1 100644
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
@@ -104,6 +104,20 @@
@@ -105,6 +105,20 @@
<version>5.1.48</version>
<scope>runtime</scope>
</dependency>

View File

@ -1,18 +1,17 @@
From 4aecdf4068b45c1ffc7c78aaf720e30e63fce926 Mon Sep 17 00:00:00 2001
From 0116c8f04967a0c811477029d574d2e55a5b9193 Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Fri, 22 Sep 2017 13:15:09 +0200
Subject: [PATCH] Allow plugins to use SLF4J for logging
diff --git a/api/pom.xml b/api/pom.xml
index 4b9e171d..2380a5fd 100644
index 15228459..705b7279 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -49,5 +49,12 @@
<version>${netty.version}</version>
@@ -55,5 +55,11 @@
<version>1.25</version>
<scope>compile</scope>
</dependency>
+
+ <!-- Waterfall - Add SLF4J -->
+ <dependency>
+ <groupId>org.slf4j</groupId>

View File

@ -1,4 +1,4 @@
From 86125c4bf1167e2d12111686fd37ac9214a0edf1 Mon Sep 17 00:00:00 2001
From 9d1697f260c3f6b4ae801401e7ed2d1c99d7127f Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Mon, 2 Dec 2019 11:35:17 +0000
Subject: [PATCH] ConnectionInitEvent
@ -6,14 +6,16 @@ Subject: [PATCH] ConnectionInitEvent
diff --git a/api/src/main/java/io/github/waterfallmc/waterfall/event/ConnectionInitEvent.java b/api/src/main/java/io/github/waterfallmc/waterfall/event/ConnectionInitEvent.java
new file mode 100644
index 00000000..e884eac8
index 00000000..6f6c6226
--- /dev/null
+++ b/api/src/main/java/io/github/waterfallmc/waterfall/event/ConnectionInitEvent.java
@@ -0,0 +1,52 @@
@@ -0,0 +1,56 @@
+package io.github.waterfallmc.waterfall.event;
+
+import net.md_5.bungee.api.Callback;
+import net.md_5.bungee.api.config.ListenerInfo;
+import net.md_5.bungee.api.event.AsyncEvent;
+import net.md_5.bungee.api.event.ClientConnectEvent;
+import net.md_5.bungee.api.plugin.Cancellable;
+
+import java.net.InetSocketAddress;
@ -24,15 +26,17 @@ index 00000000..e884eac8
+/**
+ * Represents a brand new connection made to the proxy, allowing for plugins to
+ * efficiently close a connection, useful for connection throttlers, etc
+ * @deprecated spigot added a variant of this event upstream, this class may be removed in the future
+ */
+@ToString
+public class ConnectionInitEvent extends AsyncEvent<ConnectionInitEvent> implements Cancellable {
+@Deprecated
+public class ConnectionInitEvent extends ClientConnectEvent implements Cancellable {
+
+ private final SocketAddress remoteAddress;
+ private boolean isCancelled = false;
+
+ public ConnectionInitEvent(SocketAddress remoteAddress, Callback<ConnectionInitEvent> done) {
+ super(done);
+ public ConnectionInitEvent(SocketAddress remoteAddress, ListenerInfo listener, Callback<ClientConnectEvent> done) {
+ super(remoteAddress, listener, done);
+ this.remoteAddress = remoteAddress;
+ }
+
@ -62,8 +66,63 @@ index 00000000..e884eac8
+ return remoteAddress;
+ }
+}
diff --git a/api/src/main/java/net/md_5/bungee/api/event/ClientConnectEvent.java b/api/src/main/java/net/md_5/bungee/api/event/ClientConnectEvent.java
index 50ce034c..df5ffda7 100644
--- a/api/src/main/java/net/md_5/bungee/api/event/ClientConnectEvent.java
+++ b/api/src/main/java/net/md_5/bungee/api/event/ClientConnectEvent.java
@@ -1,12 +1,17 @@
package net.md_5.bungee.api.event;
import java.net.SocketAddress;
+
+import io.github.waterfallmc.waterfall.event.ConnectionInitEvent;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
+
+import net.md_5.bungee.api.Callback;
import net.md_5.bungee.api.config.ListenerInfo;
import net.md_5.bungee.api.plugin.Cancellable;
import net.md_5.bungee.api.plugin.Event;
+import net.md_5.bungee.api.plugin.Listener;
/**
* Event called to represent an initial client connection.
@@ -14,10 +19,9 @@ import net.md_5.bungee.api.plugin.Event;
* Note: This event is called at an early stage of every connection, handling
* should be <b>fast</b>.
*/
-@Data
@ToString(callSuper = false)
@EqualsAndHashCode(callSuper = false)
-public class ClientConnectEvent extends Event implements Cancellable
+public class ClientConnectEvent extends AsyncEvent<ClientConnectEvent> implements Cancellable// Waterfall
{
/**
@@ -32,4 +36,20 @@ public class ClientConnectEvent extends Event implements Cancellable
* Listener that accepted the connection.
*/
private final ListenerInfo listener;
+
+ public ClientConnectEvent(SocketAddress remoteAddress, ListenerInfo listener, Callback<ClientConnectEvent> done) {
+ super(done);
+ socketAddress = remoteAddress;
+ this.listener = listener;
+ }
+
+ @Override
+ public boolean isCancelled() {
+ return cancelled;
+ }
+
+ @Override
+ public void setCancelled(boolean cancel) {
+ this.cancelled = cancel;
+ }
}
diff --git a/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java b/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
index 0c91f7ed..e89f3669 100644
index 8969a5ed..4ad17d1a 100644
--- a/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
+++ b/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
@@ -1,6 +1,7 @@
@ -74,28 +133,23 @@ index 0c91f7ed..e89f3669 100644
import io.netty.buffer.PooledByteBufAllocator;
import io.netty.channel.Channel;
import io.netty.channel.ChannelException;
@@ -26,6 +27,8 @@ import io.netty.handler.codec.haproxy.HAProxyMessageDecoder;
import io.netty.handler.timeout.ReadTimeoutHandler;
import io.netty.util.AttributeKey;
import io.netty.util.internal.PlatformDependent;
@@ -64,16 +65,23 @@ public class PipelineUtils
ch.close();
return;
}
-
ListenerInfo listener = ch.attr( LISTENER ).get();
- if ( BungeeCord.getInstance().getPluginManager().callEvent( new ClientConnectEvent( remoteAddress, listener ) ).isCancelled() )
- {
+ ConnectionInitEvent connectionInitEvent = new ConnectionInitEvent(ch.remoteAddress(), listener, (result, throwable) -> { // Waterfall
+
+import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
@@ -62,9 +65,22 @@ public class PipelineUtils
+ if (result.isCancelled()) {
ch.close();
return;
}
+ ConnectionInitEvent connectionInitEvent = new ConnectionInitEvent(ch.remoteAddress(), (result, throwable) -> { // Waterfall
+
+ if (result.isCancelled()) {
+ ch.close();
+ return;
+ }
+
ListenerInfo listener = ch.attr( LISTENER ).get();
+ try {
BASE.initChannel( ch );
+ } catch (Exception e) {
@ -106,7 +160,7 @@ index 0c91f7ed..e89f3669 100644
ch.pipeline().addBefore( FRAME_DECODER, LEGACY_DECODER, new LegacyDecoder() );
ch.pipeline().addAfter( FRAME_DECODER, PACKET_DECODER, new MinecraftDecoder( Protocol.HANDSHAKE, true, ProxyServer.getInstance().getProtocolVersion() ) );
ch.pipeline().addAfter( FRAME_PREPENDER, PACKET_ENCODER, new MinecraftEncoder( Protocol.HANDSHAKE, true, ProxyServer.getInstance().getProtocolVersion() ) );
@@ -75,6 +91,9 @@ public class PipelineUtils
@@ -84,6 +92,9 @@ public class PipelineUtils
{
ch.pipeline().addFirst( new HAProxyMessageDecoder() );
}