Merge upstream. Closes #167

This commit is contained in:
Jamie Mansfield 2017-08-13 16:08:33 +01:00
parent 5b488566be
commit 34068e62d8
No known key found for this signature in database
GPG Key ID: 27F6918C0D47DF94
13 changed files with 58 additions and 58 deletions

@ -1 +1 @@
Subproject commit da88d5c50263517b4bca8d4aa9bcfcf637876b0b
Subproject commit fd675022c0dd2d8597c2f32a89d81545d99cfa9d

View File

@ -1,4 +1,4 @@
From 5ef37b1ee040906e1b3d31ca110c505d8422145c Mon Sep 17 00:00:00 2001
From eaa76ca824b8557870d7a935def28a688678d314 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@outlook.com>
Date: Mon, 14 Mar 2016 15:40:44 -0700
Subject: [PATCH] Optimize uuid conversions
@ -258,10 +258,10 @@ index 27b51849..8bf17f9c 100644
}
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
index 68aa3f85..616e9ee8 100644
index e596f822..2f0cd28d 100644
--- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
+++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
@@ -601,7 +601,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@@ -600,7 +600,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@Override
public String getUUID()
{
@ -271,5 +271,5 @@ index 68aa3f85..616e9ee8 100644
@Override
--
2.12.0
2.13.4

View File

@ -1,4 +1,4 @@
From c7982cae7484dd1fd4288ad0076c3ca9c6be5c79 Mon Sep 17 00:00:00 2001
From 6741481b996f418b8572825b0530ba62a4003f74 Mon Sep 17 00:00:00 2001
From: Daniel Naylor <git@drnaylor.co.uk>
Date: Tue, 25 Oct 2016 12:23:07 -0400
Subject: [PATCH] Add support for FML with IP Forwarding enabled
@ -67,10 +67,10 @@ index fcb3dc0d..e0235212 100644
}
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 c45f8412..f28e7182 100644
index 47a30f71..eb6b8ea9 100644
--- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java
+++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
@@ -180,8 +180,12 @@ public final class UserConnection implements ProxiedPlayer
@@ -181,8 +181,12 @@ public final class UserConnection implements ProxiedPlayer
forgeClientHandler = new ForgeClientHandler( this );

View File

@ -1,23 +1,23 @@
From 45c296f3f138f1c6197f90c2dd9735f4f0d0f89a Mon Sep 17 00:00:00 2001
From 8c1a507e084cbf9b0bd023b8a736554406eaa2e5 Mon Sep 17 00:00:00 2001
From: Tux <write@imaginarycode.com>
Date: Thu, 19 May 2016 17:36:31 -0600
Subject: [PATCH] Better unit tests for Chat API
diff --git a/chat/src/test/java/net/md_5/bungee/api/chat/TranslatableComponentTest.java b/chat/src/test/java/net/md_5/bungee/api/chat/TranslatableComponentTest.java
index 453d375d..1a2ffd0b 100644
index 0837c672..7d1ee8e7 100644
--- a/chat/src/test/java/net/md_5/bungee/api/chat/TranslatableComponentTest.java
+++ b/chat/src/test/java/net/md_5/bungee/api/chat/TranslatableComponentTest.java
@@ -3,6 +3,8 @@ package net.md_5.bungee.api.chat;
import net.md_5.bungee.api.chat.TranslatableComponent;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
+import java.util.List;
+
import static org.junit.Assert.assertEquals;
public class TranslatableComponentTest
@@ -15,4 +17,25 @@ public class TranslatableComponentTest
{
@@ -13,4 +15,25 @@ public class TranslatableComponentTest
assertEquals( "Test string with 2 placeholders: aoeu", testComponent.toPlainText() );
assertEquals( "§fTest string with §f2§f placeholders: §faoeu", testComponent.toLegacyText() );
}
@ -44,10 +44,10 @@ index 453d375d..1a2ffd0b 100644
+ }
}
diff --git a/proxy/src/test/java/net/md_5/bungee/chat/ComponentsTest.java b/proxy/src/test/java/net/md_5/bungee/chat/ComponentsTest.java
index 004a2b7a..f34eb3d2 100644
index c844dab5..8952cbf8 100644
--- a/proxy/src/test/java/net/md_5/bungee/chat/ComponentsTest.java
+++ b/proxy/src/test/java/net/md_5/bungee/chat/ComponentsTest.java
@@ -123,6 +123,26 @@ public class ComponentsTest
@@ -140,6 +140,26 @@ public class ComponentsTest
Assert.assertEquals( eventRetention[1].getClickEvent(), testClickEvent );
}

View File

@ -1,4 +1,4 @@
From d1348d290d22ea00539c69005a6bd9d56f7437ca Mon Sep 17 00:00:00 2001
From 49dc09c6b0f40d42941d1f1b190353bbb503275b Mon Sep 17 00:00:00 2001
From: Tux <write@imaginarycode.com>
Date: Thu, 19 May 2016 18:05:33 -0600
Subject: [PATCH] Micro-optimizations
@ -31,7 +31,7 @@ index 71a5a158..520ee315 100644
if ( split.length == 0 )
{
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 34e3c3e3..93dd74ee 100644
index 36af60a9..a3a16d23 100644
--- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
+++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
@@ -493,7 +493,9 @@ public class BungeeCord extends ProxyServer
@ -46,10 +46,10 @@ index 34e3c3e3..93dd74ee 100644
{
}
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 c5d69ee5..50617642 100644
index eb6b8ea9..b3e352c1 100644
--- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java
+++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
@@ -548,7 +548,7 @@ public final class UserConnection implements ProxiedPlayer
@@ -549,7 +549,7 @@ public final class UserConnection implements ProxiedPlayer
@Override
public Locale getLocale()
{

View File

@ -1,4 +1,4 @@
From 29f41582be2e1900b28375aee2f3c5ca5117fc9f Mon Sep 17 00:00:00 2001
From 322a8e05f4993315d83912370aba80ccdb6d0338 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@techcable.net>
Date: Thu, 19 May 2016 17:09:22 -0600
Subject: [PATCH] Allow invalid packet ids for forge servers
@ -93,10 +93,10 @@ index e0235212..dc5b82e2 100644
ch.write( BungeeCord.getInstance().registerChannels() );
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 a70ac2c9..bbc56eed 100644
index b3e352c1..4c9f09ea 100644
--- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java
+++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
@@ -69,6 +69,7 @@ public final class UserConnection implements ProxiedPlayer
@@ -70,6 +70,7 @@ public final class UserConnection implements ProxiedPlayer
@NonNull
private final ProxyServer bungee;
@NonNull

View File

@ -1,4 +1,4 @@
From 43f95c473f5fd5e57755f33d41349fa2a759be72 Mon Sep 17 00:00:00 2001
From 8990b190d9faa10635ea9e20fd1647b9af6beb77 Mon Sep 17 00:00:00 2001
From: Janmm14 <computerjanimaus@yahoo.de>
Date: Sat, 12 Dec 2015 23:43:30 +0100
Subject: [PATCH] Optional server list ping logging.
@ -85,10 +85,10 @@ index 2a2b9d8c..c2e751be 100644
}
}
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
index 5e7f3232..dd98b37e 100644
index 2f0cd28d..7ab4d042 100644
--- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
+++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
@@ -282,19 +282,22 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@@ -281,19 +281,22 @@ public class InitialHandler extends PacketHandler implements PendingConnection
}
this.virtualHost = InetSocketAddress.createUnresolved( handshake.getHost(), handshake.getPort() );
@ -112,7 +112,7 @@ index 5e7f3232..dd98b37e 100644
thisState = State.USERNAME;
ch.setProtocol( Protocol.LOGIN );
@@ -607,7 +610,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@@ -606,7 +609,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@Override
public String toString()
{

View File

@ -1,4 +1,4 @@
From 9d7e3ff31779f813dcecb055a610325fbc5b00da Mon Sep 17 00:00:00 2001
From 804e627d64e94f04491b135be966febdc2161074 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@outlook.com>
Date: Sun, 7 Feb 2016 00:01:19 -0700
Subject: [PATCH] Add a property to accept invalid ping packets
@ -9,10 +9,10 @@ You can enable it by setting '-Dwaterfall.acceptInvalidPackets=true' at the comm
Fixes #23
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
index 497384c4..d6c0ce2a 100644
index 7ab4d042..bf450f98 100644
--- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
+++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
@@ -248,10 +248,14 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@@ -247,10 +247,14 @@ public class InitialHandler extends PacketHandler implements PendingConnection
thisState = State.PING;
}
@ -29,5 +29,5 @@ index 497384c4..d6c0ce2a 100644
disconnect( "" );
}
--
2.12.0
2.13.4

View File

@ -1,4 +1,4 @@
From 1685165446a90c7171c880b78c92760c3007d8a5 Mon Sep 17 00:00:00 2001
From 49b5da0be5404cae435955cddd3792845fcc5b24 Mon Sep 17 00:00:00 2001
From: kamcio96 <k.nadworski@icloud.com>
Date: Mon, 14 Mar 2016 16:07:20 -0700
Subject: [PATCH] Use a worker and a boss event loop group.
@ -8,7 +8,7 @@ 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 93dd74e..1073f8f 100644
index a3a16d23..952a1fe8 100644
--- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
+++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
@@ -110,7 +110,7 @@ public class BungeeCord extends ProxyServer
@ -48,7 +48,7 @@ index 93dd74e..1073f8f 100644
}
}
}
@@ -408,12 +409,14 @@ public class BungeeCord extends ProxyServer
@@ -436,12 +437,14 @@ public class BungeeCord extends ProxyServer
}
getLogger().info( "Closing IO threads" );
@ -68,9 +68,9 @@ index 93dd74e..1073f8f 100644
+ } catch (InterruptedException ignored) {}
}
if ( reconnectHandler != null )
getLogger().info( "Thank you and goodbye" );
diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeServerInfo.java b/proxy/src/main/java/net/md_5/bungee/BungeeServerInfo.java
index bc56d4f..efcba31 100644
index bc56d4f3..efcba311 100644
--- a/proxy/src/main/java/net/md_5/bungee/BungeeServerInfo.java
+++ b/proxy/src/main/java/net/md_5/bungee/BungeeServerInfo.java
@@ -145,7 +145,7 @@ public class BungeeServerInfo implements ServerInfo
@ -83,5 +83,5 @@ index bc56d4f..efcba31 100644
.option( ChannelOption.CONNECT_TIMEOUT_MILLIS, 5000 ) // TODO: Configurable
.remoteAddress( getAddress() )
--
2.7.4 (Apple Git-66)
2.13.4

View File

@ -1,4 +1,4 @@
From 9f9b2f38183801c34733fd169222be1614c8d0a2 Mon Sep 17 00:00:00 2001
From e9acac76a7fb0e3a81951e2b51377d921a3feeb2 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@techcable.net>
Date: Fri, 18 Mar 2016 10:53:24 -0700
Subject: [PATCH] Better Decompression Sanity
@ -6,7 +6,7 @@ Subject: [PATCH] Better Decompression Sanity
Fixes #40
diff --git a/proxy/src/main/java/net/md_5/bungee/compress/PacketDecompressor.java b/proxy/src/main/java/net/md_5/bungee/compress/PacketDecompressor.java
index 21b3ea2..37fe6ac 100644
index 21b3ea2b..37fe6ac7 100644
--- a/proxy/src/main/java/net/md_5/bungee/compress/PacketDecompressor.java
+++ b/proxy/src/main/java/net/md_5/bungee/compress/PacketDecompressor.java
@@ -1,5 +1,7 @@
@ -45,10 +45,10 @@ index 21b3ea2..37fe6ac 100644
out.add( decompressed );
decompressed = null;
diff --git a/proxy/src/main/java/net/md_5/bungee/netty/ChannelWrapper.java b/proxy/src/main/java/net/md_5/bungee/netty/ChannelWrapper.java
index 2b2d15b..edb72b9 100644
index 71df1fd5..4882b8ed 100644
--- a/proxy/src/main/java/net/md_5/bungee/netty/ChannelWrapper.java
+++ b/proxy/src/main/java/net/md_5/bungee/netty/ChannelWrapper.java
@@ -147,7 +147,7 @@ public class ChannelWrapper
@@ -146,7 +146,7 @@ public class ChannelWrapper
if ( ch.pipeline().get( PacketDecompressor.class ) == null && compressionThreshold != -1 )
{
@ -58,5 +58,5 @@ index 2b2d15b..edb72b9 100644
if ( compressionThreshold == -1 )
{
--
2.7.4 (Apple Git-66)
2.13.4

View File

@ -1,14 +1,14 @@
From 2222e21e5db34c66ba69e801e56308b6d4d9166a Mon Sep 17 00:00:00 2001
From b48386b19c09d782f6474f759f0805232741710d Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@techcable.net>
Date: Mon, 6 Jun 2016 13:36:10 -0600
Subject: [PATCH] Don't send KICK packets while in HANDSHAKE state
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
index d6c0ce2a..62cbf70f 100644
index bf450f98..9e501c00 100644
--- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
+++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
@@ -267,7 +267,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@@ -266,7 +266,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
this.handshake = handshake;
ch.setVersion( handshake.getProtocolVersion() );
@ -17,7 +17,7 @@ index d6c0ce2a..62cbf70f 100644
// with Bungee's IP forwarding, so we detect it, and remove it from the host string, for now.
// We know FML appends \00FML\00. However, we need to also consider that other systems might
// add their own data to the end of the string. So, we just take everything from the \0 character
@@ -548,7 +548,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@@ -547,7 +547,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@Override
public void disconnect(final BaseComponent... reason)
{
@ -27,5 +27,5 @@ index d6c0ce2a..62cbf70f 100644
ch.delayedClose( new Kick( ComponentSerializer.toString( reason ) ) );
} else
--
2.12.0
2.13.4

View File

@ -1,4 +1,4 @@
From 51c093da1160167eb42ed2214a8d78ea38c1b2c6 Mon Sep 17 00:00:00 2001
From ac99d83de8dc8ba2438aea3002420d4c43a2706c Mon Sep 17 00:00:00 2001
From: Ichbinjoe <joe@ibj.io>
Date: Sat, 16 Jul 2016 20:44:01 -0400
Subject: [PATCH] Add timeout variant to connect methods
@ -6,10 +6,10 @@ Subject: [PATCH] Add timeout variant to connect methods
Also added more connect methods to ProxiedPlayer, in addition to the new method
diff --git a/api/src/main/java/net/md_5/bungee/api/connection/ProxiedPlayer.java b/api/src/main/java/net/md_5/bungee/api/connection/ProxiedPlayer.java
index 375815c..c49e900 100644
index 16cfff8b..98754bdf 100644
--- a/api/src/main/java/net/md_5/bungee/api/connection/ProxiedPlayer.java
+++ b/api/src/main/java/net/md_5/bungee/api/connection/ProxiedPlayer.java
@@ -69,6 +69,38 @@ public interface ProxiedPlayer extends Connection, CommandSender
@@ -98,6 +98,38 @@ public interface ProxiedPlayer extends Connection, CommandSender
*/
void connect(ServerInfo target, Callback<Boolean> callback);
@ -49,10 +49,10 @@ index 375815c..c49e900 100644
* Gets the server this player is connected to.
*
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 f278a48..b984c0b 100644
index 4c9f09ea..9c56d06a 100644
--- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java
+++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
@@ -248,6 +248,12 @@ public final class UserConnection implements ProxiedPlayer
@@ -249,6 +249,12 @@ public final class UserConnection implements ProxiedPlayer
public void connect(ServerInfo info, final Callback<Boolean> callback, final boolean retry)
{
@ -65,7 +65,7 @@ index f278a48..b984c0b 100644
Preconditions.checkNotNull( info, "info" );
ServerConnectEvent event = new ServerConnectEvent( this, info );
@@ -321,7 +327,7 @@ public final class UserConnection implements ProxiedPlayer
@@ -322,7 +328,7 @@ public final class UserConnection implements ProxiedPlayer
if ( retry && def != null && ( getServer() == null || def != getServer().getInfo() ) )
{
sendMessage( bungee.getTranslation( "fallback_lobby" ) );
@ -74,7 +74,7 @@ index f278a48..b984c0b 100644
} else if ( dimensionChange )
{
disconnect( bungee.getTranslation( "fallback_kick", future.cause().getClass().getName() ) );
@@ -336,7 +342,7 @@ public final class UserConnection implements ProxiedPlayer
@@ -337,7 +343,7 @@ public final class UserConnection implements ProxiedPlayer
.channel( PipelineUtils.getChannel() )
.group( ch.getHandle().eventLoop() )
.handler( initializer )
@ -84,5 +84,5 @@ index f278a48..b984c0b 100644
// Windows is bugged, multi homed users will just have to live with random connecting IPs
if ( getPendingConnection().getListener().isSetLocalAddress() && !PlatformDependent.isWindows() )
--
2.7.4
2.13.4

View File

@ -1,4 +1,4 @@
From 1a161fa1370c7ea4f7e008c4924cd5f47e106720 Mon Sep 17 00:00:00 2001
From 3608a11fa794e90f20ad13887e924a10d31daf9f Mon Sep 17 00:00:00 2001
From: Aaron Hill <aa1ronham@gmail.com>
Date: Thu, 15 Sep 2016 22:38:37 +0200
Subject: [PATCH] Fix potion race condition on Forge 1.8.9
@ -163,7 +163,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 3e8e2170..a3201946 100644
index 9c56d06a..ddc37312 100644
--- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java
+++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
@@ -2,7 +2,9 @@ package net.md_5.bungee;
@ -176,7 +176,7 @@ index 3e8e2170..a3201946 100644
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.Channel;
import io.netty.channel.ChannelFuture;
@@ -127,6 +129,10 @@ public final class UserConnection implements ProxiedPlayer
@@ -128,6 +130,10 @@ public final class UserConnection implements ProxiedPlayer
private final Scoreboard serverSentScoreboard = new Scoreboard();
@Getter
private final Collection<UUID> sentBossBars = new HashSet<>();