Interface PlayerLink


@Deprecated(forRemoval=true, since="3.0.0") public interface PlayerLink
Deprecated, for removal: This API element is subject to removal in a future version.
The Floodgate API has been deprecated in favor of the GeyserApi, which is shared between Geyser and Floodgate
  • Method Summary

    Modifier and Type
    Method
    Description
    @NonNull CompletableFuture<?>
    createLinkRequest(@NonNull UUID javaId, @NonNull String javaUsername, @NonNull String bedrockUsername)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates a link request for the given Java player.
    getLinkedPlayer(@NonNull UUID bedrockId)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Get a linked player by the bedrock uuid
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the name of this database implementation.
    long
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the duration (in seconds) before a LinkRequest timeouts
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return if account linking is allowed.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return if account linking is enabled.
    default boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    isLinkedPlayer(@NonNull UUID playerId)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Tells if the given player is a linked player
    linkPlayer(@NonNull UUID bedrockId, @NonNull UUID javaId, @NonNull String username)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Links a Java account to a Bedrock account.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Called by Floodgate after the initialization of the class.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Called when the Floodgate plugin is going to shutdown
    unlinkPlayer(@NonNull UUID javaId)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Unlinks a Java account from a Bedrock account.
    verifyLinkRequest(@NonNull UUID bedrockId, @NonNull String javaUsername, @NonNull String bedrockUsername, @NonNull String code)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Verifies a link request for the given Bedrock player.
  • Method Details

    • load

      void load()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Called by Floodgate after the initialization of the class. In this method the implementation should start the connection with the database and create the collections if they don't exist already.
    • getLinkedPlayer

      @NonNull CompletableFuture<LinkedPlayer> getLinkedPlayer(@NonNull UUID bedrockId)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get a linked player by the bedrock uuid
      Parameters:
      bedrockId - the uuid of the bedrock player
      Returns:
      a completable future with the LinkedPlayer. The future will have a null value if that Bedrock player isn't linked
    • isLinkedPlayer

      @NonNull CompletableFuture<Boolean> isLinkedPlayer(@NonNull UUID playerId)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Tells if the given player is a linked player
      Parameters:
      playerId - the uuid of the player to check, can be both a Java or a Bedrock uuid
      Returns:
      true if the player is a linked player
    • linkPlayer

      @NonNull CompletableFuture<Void> linkPlayer(@NonNull UUID bedrockId, @NonNull UUID javaId, @NonNull String username)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Links a Java account to a Bedrock account.
      Parameters:
      bedrockId - the uuid of the Bedrock player
      javaId - the uuid of the Java player
      username - the username of the Java player
      Returns:
      a future holding void on success or completed exceptionally when failed
    • unlinkPlayer

      @NonNull CompletableFuture<Void> unlinkPlayer(@NonNull UUID javaId)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Unlinks a Java account from a Bedrock account.
      Parameters:
      javaId - the uuid of the Java player
      Returns:
      a future holding void on success or completed exceptionally when failed
    • createLinkRequest

      @NonNull CompletableFuture<?> createLinkRequest(@NonNull UUID javaId, @NonNull String javaUsername, @NonNull String bedrockUsername)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a link request for the given Java player.
      Parameters:
      javaId - the uuid of the Java player
      javaUsername - the username of the Java player
      bedrockUsername - the username of the Bedrock player receiving the link request
      Returns:
      a future holding the result of the link request which will be a LinkRequestResult on failure and the link code (string) on success
    • verifyLinkRequest

      @NonNull CompletableFuture<LinkRequestResult> verifyLinkRequest(@NonNull UUID bedrockId, @NonNull String javaUsername, @NonNull String bedrockUsername, @NonNull String code)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Verifies a link request for the given Bedrock player.
      Parameters:
      bedrockId - the uuid of the Bedrock player
      javaUsername - the username of the Java players who requested the link
      bedrockUsername - the username of the Bedrock player
      code - the code created in createLinkRequest(UUID, String, String)
      Returns:
      a future holding the result of the link verification
    • getName

      String getName()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the name of this database implementation. This will return null when Player Linking is disabled or when only Global Linking is used.
    • isEnabled

      boolean isEnabled()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return if account linking is enabled. The difference between enabled and allowed is that 'enabled' still allows already linked people to join with their linked account while 'allow linking' allows people to link accounts using the commands.
    • getVerifyLinkTimeout

      long getVerifyLinkTimeout()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the duration (in seconds) before a LinkRequest timeouts
    • isAllowLinking

      boolean isAllowLinking()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return if account linking is allowed. The difference between enabled and allowed is that 'enabled' still allows already linked people to join with their linked account while 'allow linking' allows people to link accounts using the commands.
    • isEnabledAndAllowed

      default boolean isEnabledAndAllowed()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • stop

      void stop()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Called when the Floodgate plugin is going to shutdown