Package org.geysermc.floodgate.api.link
Interface LinkRequest
public interface LinkRequest
-
Method Summary
Modifier and TypeMethodDescriptionReturns the username of player being linked.Returns the Java unique id of the linked player.Returns the Java username of the linked player.Returns the code that the Bedrock player has to enter in order to link the account.longReturns the unix time when the player link was requested.booleanisExpired(long linkTimeout) If this player link request is expired.default booleanisRequestedPlayer(FloodgatePlayer player) Checks if the given FloodgatePlayer is the player requested in this LinkRequest.
-
Method Details
-
getJavaUsername
String getJavaUsername()Returns the Java username of the linked player. -
getJavaUniqueId
UUID getJavaUniqueId()Returns the Java unique id of the linked player. -
getLinkCode
String getLinkCode()Returns the code that the Bedrock player has to enter in order to link the account. -
getBedrockUsername
String getBedrockUsername()Returns the username of player being linked. -
getRequestTime
long getRequestTime()Returns the unix time when the player link was requested. -
isExpired
boolean isExpired(long linkTimeout) If this player link request is expired.- Parameters:
linkTimeout- the link timeout in millis- Returns:
- true if the difference between now and requestTime is greater then the link timout
-
isRequestedPlayer
Checks if the given FloodgatePlayer is the player requested in this LinkRequest. This method will check both the real bedrock usernameFloodgatePlayer.getUsername()and the edited usernameFloodgatePlayer.getJavaUsername()and returns true if one of the two matches.- Parameters:
player- the player to check- Returns:
- true if the given player is the player requested
-