Interface AccountData

All Known Implementing Classes:
AccountDataImpl

public interface AccountData
Interface used to encapsulate the data of an nLogin account.

An instance can be obtained through the nLoginAPI.getAccount(Identity) method.

  • Method Details

    • getId

      Optional<Long> getId()
      Returns the registered id of this account. It will not be present if the account is not stored in database yet.
      Since:
      API v3
    • getType

      @Nonnull AccountType getType()
      Returns the type of this account. It will not be present if the account is not registered.
      Since:
      API v3
    • getLastName

      @Nonnull String getLastName()
      Returns the registered last name of this account.
      Since:
      API v3
    • getUniqueId

      Optional<UUID> getUniqueId()
      Returns the registered unique ID of this account.
      Since:
      API v3
    • getMojangId

      Optional<UUID> getMojangId()
      Returns the registered Mojang ID of this account.
      Since:
      API v3
    • getBedrockId

      Optional<UUID> getBedrockId()
      Returns the registered bedrock ID of this account.
      Since:
      API v3
    • getHashedPassword

      Optional<String> getHashedPassword()
      Returns the registered hashed password of this account.
      Since:
      API v3
    • comparePassword

      default boolean comparePassword(String plainPassword)
      Checks that the password you provided is valid.
      Parameters:
      plainPassword - Plain password to be compared (not hashed).
      Returns:
      true if the password is valid.
      Since:
      API v3
    • getLastAddress

      @Nonnull default String getLastAddress()
      Returns the registered last address of this account.
      Since:
      API v3
    • getLastIP

      @Nonnull String getLastIP()
      Returns the registered last IP address of this account.
      Since:
      API v4
    • getLastLogin

      @Nonnull Instant getLastLogin()
      Returns the last login of this account.
      Since:
      API v3
    • getCreationDate

      @Nonnull Instant getCreationDate()
      Returns the creation date of this account.
      Since:
      API v3
    • getEmail

      Optional<String> getEmail()
      Returns the registered email of this account.
      Since:
      API v3
    • getDiscordId

      Optional<String> getDiscordId()
      Returns the registered discord id of this account.
      Since:
      API v3
    • getSettings

      @Nonnull Map<String,Object> getSettings()
      Returns the settings of this account. The returned value is read-only.
      Since:
      API v3
    • getLanguage

      default Optional<String> getLanguage()
      Returns the last language of this account.
      Since:
      API v3