Interface Connection


@NonNull public interface Connection
Represents a player connection.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the name of the connection.
    boolean
    transfer​(@NonNull String address, @org.checkerframework.common.value.qual.IntRange(from=0L, to=65535L) int port)
    Transfer the connection to a server.
    Gets the UUID of the connection.
    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 the UUID of 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 server
      port - The port of the server
      Returns:
      true if the transfer was a success