Package org.geysermc.api.session
Interface Connection
@NonNull
public interface Connection
Represents a player connection.
-
Method Summary
Modifier and TypeMethodDescriptionname()Gets the name of the connection.booleantransfer(@NonNull String address, @org.checkerframework.common.value.qual.IntRange(from=0L, to=65535L) int port)Transfer the connection to a server.uuid()Gets theUUIDof the connection.xuid()Gets the XUID of the connection.
-
Method Details
-
name
String name()Gets the name of the connection.- Returns:
- the name of the connection
-
uuid
UUID uuid()Gets theUUIDof the connection.- Returns:
- the UUID of the connection
-
xuid
String xuid()Gets the XUID of the connection.- Returns:
- the XUID of the connection
-
transfer
boolean transfer(@NonNull String address, @org.checkerframework.common.value.qual.IntRange(from=0L, to=65535L) int port)Transfer the connection to a server. A Bedrock player can successfully transfer to the same server they are currently playing on.- Parameters:
address- The address of the serverport- The port of the server- Returns:
- true if the transfer was a success
-