Interface PasswordManager
- All Known Implementing Classes:
BasicPasswordManager
public interface PasswordManager
Represents a class for enabling/disabling the password feature.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidDisable the password requirement for joining the server.default voidEnable the password requirement for joining the server.booleanGet whether a password is required to join the server.voidreload()Reload the enabled status from disk.voidsetPasswordEnabled(boolean value) Set the password requirement.
-
Method Details
-
reload
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
Set the password requirement.- Parameters:
value- whether the password should be required- Throws:
IOException- if an exception occurs while saving the file
-
enablePassword
Enable the password requirement for joining the server.- Throws:
IOException- if an exception occurs while saving the file
-
disablePassword
Disable the password requirement for joining the server.- Throws:
IOException- if an exception occurs while saving the file
-