Interface PasswordManager

All Known Implementing Classes:
BasicPasswordManager

public interface PasswordManager
Represents a class for enabling/disabling the password feature.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Disable the password requirement for joining the server.
    default void
    Enable the password requirement for joining the server.
    boolean
    Get whether a password is required to join the server.
    void
    Reload the enabled status from disk.
    void
    setPasswordEnabled(boolean value)
    Set the password requirement.
  • Method Details

    • reload

      void reload() throws IOException
      Reload the enabled status from disk.
      Throws:
      IOException - if an exception occurs while reading the file
    • isPasswordEnabled

      boolean isPasswordEnabled()
      Get whether a password is required to join the server.
      Returns:
      whether a password is required
    • setPasswordEnabled

      void setPasswordEnabled(boolean value) throws IOException
      Set the password requirement.
      Parameters:
      value - whether the password should be required
      Throws:
      IOException - if an exception occurs while saving the file
    • enablePassword

      default void enablePassword() throws IOException
      Enable the password requirement for joining the server.
      Throws:
      IOException - if an exception occurs while saving the file
    • disablePassword

      default void disablePassword() throws IOException
      Disable the password requirement for joining the server.
      Throws:
      IOException - if an exception occurs while saving the file