mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Add method in Connection API for transferring connections (#2891)
This commit is contained in:
parent
9c7210ef92
commit
f8e983887e
2 changed files with 26 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue