Interface GeyserApiBase


public interface GeyserApiBase
The base API class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable Connection
    connectionByUuid(@NonNull UUID uuid)
    Gets the connection from the given UUID, if applicable.
    @Nullable Connection
    connectionByXuid(@NonNull String xuid)
    Gets the connection from the given XUID, if applicable.
    boolean
    isBedrockPlayer(@NonNull UUID uuid)
    Method to determine if the given online player is a Bedrock player.
    default int
    Returns the major API version.
    default int
    Returns the minor API version.
    @NonNull List<? extends Connection>
    Returns all the online connections.
    int
    Returns the amount of online connections.
    boolean
    sendForm(@NonNull UUID uuid, @NonNull org.geysermc.cumulus.form.Form form)
    Sends a form to the given connection and opens it.
    boolean
    sendForm(@NonNull UUID uuid, @NonNull org.geysermc.cumulus.form.util.FormBuilder<?,?,?> formBuilder)
    Sends a form to the given connection and opens it.
    boolean
    transfer(@NonNull UUID uuid, @NonNull String address, @org.checkerframework.common.value.qual.IntRange(from=0L, to=65535L) int port)
    Transfer the given connection to a server.
    @MonotonicNonNull String
    Returns the prefix used by Floodgate.
  • Method Details

    • connectionByUuid

      @Nullable Connection connectionByUuid(@NonNull UUID uuid)
      Gets the connection from the given UUID, if applicable. The player must be logged in to the Java server for this to return a non-null value.
      Parameters:
      uuid - the UUID of the connection
      Returns:
      the connection from the given UUID, if applicable
    • connectionByXuid

      @Nullable Connection connectionByXuid(@NonNull String xuid)
      Gets the connection from the given XUID, if applicable. This method only works for online connections.
      Parameters:
      xuid - the XUID of the session
      Returns:
      the connection from the given UUID, if applicable
    • isBedrockPlayer

      boolean isBedrockPlayer(@NonNull UUID uuid)
      Method to determine if the given online player is a Bedrock player.
      Parameters:
      uuid - the uuid of the online player
      Returns:
      true if the given online player is a Bedrock player
    • sendForm

      boolean sendForm(@NonNull UUID uuid, @NonNull org.geysermc.cumulus.form.Form form)
      Sends a form to the given connection and opens it.
      Parameters:
      uuid - the uuid of the connection to open it on
      form - the form to send
      Returns:
      whether the form was successfully sent
    • sendForm

      boolean sendForm(@NonNull UUID uuid, @NonNull org.geysermc.cumulus.form.util.FormBuilder<?,?,?> formBuilder)
      Sends a form to the given connection and opens it.
      Parameters:
      uuid - the uuid of the connection to open it on
      formBuilder - the formBuilder to send
      Returns:
      whether the form was successfully sent
    • transfer

      boolean transfer(@NonNull UUID uuid, @NonNull String address, @org.checkerframework.common.value.qual.IntRange(from=0L, to=65535L) int port)
      Transfer the given connection to a server. A Bedrock player can successfully transfer to the same server they are currently playing on.
      Parameters:
      uuid - the uuid of the connection
      address - the address of the server
      port - the port of the server
      Returns:
      true if the transfer was a success
    • onlineConnections

      @NonNull List<? extends Connection> onlineConnections()
      Returns all the online connections.
    • onlineConnectionsCount

      int onlineConnectionsCount()
      Returns the amount of online connections.
    • usernamePrefix

      @MonotonicNonNull String usernamePrefix()
      Returns the prefix used by Floodgate. Will be null when the auth-type isn't Floodgate.
    • majorApiVersion

      default int majorApiVersion()
      Returns the major API version. Bumped whenever a significant breaking change or feature addition is added.
    • minorApiVersion

      default int minorApiVersion()
      Returns the minor API version. May be bumped for new API additions.