Interface LinkRequest


public interface LinkRequest
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns 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.
    long
    Returns the unix time when the player link was requested.
    boolean
    isExpired(long linkTimeout)
    If this player link request is expired.
    default boolean
    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

      default boolean isRequestedPlayer(FloodgatePlayer player)
      Checks if the given FloodgatePlayer is the player requested in this LinkRequest. This method will check both the real bedrock username FloodgatePlayer.getUsername() and the edited username FloodgatePlayer.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