Package org.geysermc.floodgate.api.link
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 TypeMethodDescription@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.@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 uuidgetName()Deprecated, for removal: This API element is subject to removal in a future version.Returns the name of this database implementation.longDeprecated, for removal: This API element is subject to removal in a future version.Returns the duration (in seconds) before aLinkRequesttimeoutsbooleanDeprecated, for removal: This API element is subject to removal in a future version.Return if account linking is allowed.booleanDeprecated, for removal: This API element is subject to removal in a future version.Return if account linking is enabled.default booleanDeprecated, for removal: This API element is subject to removal in a future version.@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@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.voidload()Deprecated, for removal: This API element is subject to removal in a future version.Called by Floodgate after the initialization of the class.voidstop()Deprecated, for removal: This API element is subject to removal in a future version.Called when the Floodgate plugin is going to shutdown@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.@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.
-
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
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
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 playerjavaId- the uuid of the Java playerusername- the username of the Java player- Returns:
- a future holding void on success or completed exceptionally when failed
-
unlinkPlayer
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 playerjavaUsername- the username of the Java playerbedrockUsername- the username of the Bedrock player receiving the link request- Returns:
- a future holding the result of the link request which will be a
LinkRequestResulton 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 playerjavaUsername- the username of the Java players who requested the linkbedrockUsername- the username of the Bedrock playercode- the code created increateLinkRequest(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 aLinkRequesttimeouts -
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
-