Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 19, 2024
2 parents cf744e4 + f6b40b1 commit ecbfbf1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@ public CompletableFuture<byte[]> retrieveCookie(String cookie)
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( 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<>();
final int id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import net.md_5.bungee.protocol.packet.FinishConfiguration;
import net.md_5.bungee.protocol.packet.KeepAlive;
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.PlayerListItemRemove;
import net.md_5.bungee.protocol.packet.PluginMessage;
Expand Down Expand Up @@ -378,6 +379,12 @@ public void handle(CookieResponse cookieResponse) throws Exception
con.getPendingConnection().handle( cookieResponse );
}

@Override
public void handle(LoginPayloadResponse loginPayloadResponse) throws Exception
{
con.getPendingConnection().handle( loginPayloadResponse );
}

@Override
public String toString()
{
Expand Down

0 comments on commit ecbfbf1

Please sign in to comment.