Interface FailedAttemptsStore

All Known Implementing Classes:
JsonFailedAttemptsStore

public interface FailedAttemptsStore
Represent a class which holds the amount of failed password attempts since the last login.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Get the number of failed attempts
    default void
    Increment the number of failed attempts by one.
    void
    Reload the failed attempts from disk.
    void
    setFailedAttempts(UUID uuid, int value)
    Set the number of failed attempts
  • Method Details

    • reload

      void reload() throws IOException
      Reload the failed attempts from disk.
      Throws:
      IOException - if an exception occurs while reading the file
    • incrementFailedAttempts

      default void incrementFailedAttempts(UUID uuid) throws IOException
      Increment the number of failed attempts by one.
      Parameters:
      uuid - uuid of the connecting player
      Throws:
      IOException - if an exception occurs while saving the data to disk
    • setFailedAttempts

      void setFailedAttempts(UUID uuid, int value) throws IOException
      Set the number of failed attempts
      Parameters:
      uuid - uuid of the connecting player
      value - the new number of failed attempts
      Throws:
      IOException - if an exception occurs while saving the data to disk
    • getFailedAttempts

      int getFailedAttempts(UUID uuid)
      Get the number of failed attempts
      Parameters:
      uuid - uuid of the connecting player
      Returns:
      number of failed attempts