mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-11-27 12:46:05 +01:00
#3758: Handle LoginPayloadResponse in UpstreamBridge
This commit is contained in:
parent
81b118a8ba
commit
f6b40b1186
@ -904,7 +904,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
|||||||
public CompletableFuture<byte[]> sendData(String channel, byte[] data)
|
public CompletableFuture<byte[]> sendData(String channel, byte[] data)
|
||||||
{
|
{
|
||||||
Preconditions.checkState( getVersion() >= ProtocolConstants.MINECRAFT_1_13, "LoginPayloads are only supported in 1.13 and above" );
|
Preconditions.checkState( getVersion() >= ProtocolConstants.MINECRAFT_1_13, "LoginPayloads are only supported in 1.13 and above" );
|
||||||
Preconditions.checkState( loginRequest != null, "Cannot send login data for status or legacy connections" );
|
Preconditions.checkState( ch.getEncodeProtocol() == Protocol.LOGIN, "LoginPayloads are only supported in the login phase" );
|
||||||
|
|
||||||
CompletableFuture<byte[]> future = new CompletableFuture<>();
|
CompletableFuture<byte[]> future = new CompletableFuture<>();
|
||||||
final int id;
|
final int id;
|
||||||
|
@ -36,6 +36,7 @@ import net.md_5.bungee.protocol.packet.CookieResponse;
|
|||||||
import net.md_5.bungee.protocol.packet.FinishConfiguration;
|
import net.md_5.bungee.protocol.packet.FinishConfiguration;
|
||||||
import net.md_5.bungee.protocol.packet.KeepAlive;
|
import net.md_5.bungee.protocol.packet.KeepAlive;
|
||||||
import net.md_5.bungee.protocol.packet.LoginAcknowledged;
|
import net.md_5.bungee.protocol.packet.LoginAcknowledged;
|
||||||
|
import net.md_5.bungee.protocol.packet.LoginPayloadResponse;
|
||||||
import net.md_5.bungee.protocol.packet.PlayerListItem;
|
import net.md_5.bungee.protocol.packet.PlayerListItem;
|
||||||
import net.md_5.bungee.protocol.packet.PlayerListItemRemove;
|
import net.md_5.bungee.protocol.packet.PlayerListItemRemove;
|
||||||
import net.md_5.bungee.protocol.packet.PluginMessage;
|
import net.md_5.bungee.protocol.packet.PluginMessage;
|
||||||
@ -378,6 +379,12 @@ public class UpstreamBridge extends PacketHandler
|
|||||||
con.getPendingConnection().handle( cookieResponse );
|
con.getPendingConnection().handle( cookieResponse );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handle(LoginPayloadResponse loginPayloadResponse) throws Exception
|
||||||
|
{
|
||||||
|
con.getPendingConnection().handle( loginPayloadResponse );
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user