public interface PlayerLink
| Modifier and Type | Method and Description |
|---|---|
@NonNull CompletableFuture<?> |
createLinkRequest(@NonNull UUID javaId,
@NonNull String javaUsername,
@NonNull String bedrockUsername)
Creates a link request for the given Java player.
|
@NonNull CompletableFuture<org.geysermc.floodgate.util.LinkedPlayer> |
getLinkedPlayer(@NonNull UUID bedrockId)
Get a linked player by the bedrock uuid
|
String |
getName()
Returns the name of this database implementation.
|
long |
getVerifyLinkTimeout()
Returns the duration (in seconds) before a
LinkRequest timeouts |
boolean |
isAllowLinking()
Return if account linking is allowed.
|
boolean |
isEnabled()
Return if account linking is enabled.
|
default boolean |
isEnabledAndAllowed() |
@NonNull CompletableFuture<Boolean> |
isLinkedPlayer(@NonNull UUID playerId)
Tells if the given player is a linked player
|
@NonNull CompletableFuture<Void> |
linkPlayer(@NonNull UUID bedrockId,
@NonNull UUID javaId,
@NonNull String username)
Links a Java account to a Bedrock account.
|
void |
load()
Called by Floodgate after the initialization of the class.
|
void |
stop()
Called when the Floodgate plugin is going to shutdown
|
@NonNull CompletableFuture<Void> |
unlinkPlayer(@NonNull UUID javaId)
Unlinks a Java account from a Bedrock account.
|
@NonNull CompletableFuture<LinkRequestResult> |
verifyLinkRequest(@NonNull UUID bedrockId,
@NonNull String javaUsername,
@NonNull String bedrockUsername,
@NonNull String code)
Verifies a link request for the given Bedrock player.
|
void load()
@NonNull CompletableFuture<org.geysermc.floodgate.util.LinkedPlayer> getLinkedPlayer(@NonNull UUID bedrockId)
bedrockId - the uuid of the bedrock playerLinkedPlayer. The future will have a null value
if that Bedrock player isn't linked@NonNull CompletableFuture<Boolean> isLinkedPlayer(@NonNull UUID playerId)
playerId - the uuid of the player to check, can be both a Java or a Bedrock uuid@NonNull CompletableFuture<Void> linkPlayer(@NonNull UUID bedrockId, @NonNull UUID javaId, @NonNull String username)
bedrockId - the uuid of the Bedrock playerjavaId - the uuid of the Java playerusername - the username of the Java player@NonNull CompletableFuture<Void> unlinkPlayer(@NonNull UUID javaId)
javaId - the uuid of the Java player@NonNull CompletableFuture<?> createLinkRequest(@NonNull UUID javaId, @NonNull String javaUsername, @NonNull String bedrockUsername)
javaId - the uuid of the Java playerjavaUsername - the username of the Java playerbedrockUsername - the username of the Bedrock player receiving the link requestLinkRequestResult on failure and the link code (string) on success@NonNull CompletableFuture<LinkRequestResult> verifyLinkRequest(@NonNull UUID bedrockId, @NonNull String javaUsername, @NonNull String bedrockUsername, @NonNull String code)
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 in createLinkRequest(UUID, String, String)String getName()
boolean isEnabled()
long getVerifyLinkTimeout()
LinkRequest timeoutsboolean isAllowLinking()
default boolean isEnabledAndAllowed()
void stop()