#3736: Add simple login payload API

This commit is contained in:
Outfluencer
2024-09-09 21:06:48 +10:00
committed by md_5
parent b309e4ac50
commit a89cf5f36d
2 changed files with 44 additions and 1 deletions

View File

@@ -113,4 +113,18 @@ public interface PendingConnection extends Connection
*/
@ApiStatus.Experimental
CompletableFuture<byte[]> retrieveCookie(String cookie);
/**
* Sends a login payload request to the client.
*
* @param channel the channel to send this data via
* @param data the data to send
* @return a {@link CompletableFuture} that will be completed when the Login
* Payload response is received. If the Vanilla client doesn't know the
* channel, the {@link CompletableFuture} will complete with a null value
* @throws IllegalStateException if the player's version is not at least
* 1.13
*/
@ApiStatus.Experimental
CompletableFuture<byte[]> sendData(String channel, byte[] data);
}