1
0
mirror of https://github.com/GeyserMC/Geyser.git synced 2025-12-30 12:19:10 +00:00

Add method in Connection API for transferring connections (#2891)

This commit is contained in:
Konicai
2022-03-18 18:59:32 -04:00
committed by GitHub
parent 9c7210ef92
commit f8e983887e
2 changed files with 26 additions and 1 deletions

View File

@@ -26,6 +26,7 @@
package org.geysermc.api.session;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.common.value.qual.IntRange;
import java.util.UUID;
@@ -55,5 +56,13 @@ public interface Connection {
*/
String xuid();
/**
* Transfer the connection to a server. A Bedrock player can successfully transfer to the same server they are
* currently playing on.
*
* @param address The address of the server
* @param port The port of the server
* @return true if the transfer was a success
*/
boolean transfer(@NonNull String address, @IntRange(from = 0, to = 65535) int port);
}