//Changes 3.3.4:// * Add an isLogged column in mySQL * Add a maxLoginPerIp * Add a maxJoinPerIp * Add a way to force kick after register * Add a way to force login after register * Update session correctly * Fix Change Email command * Fix some perm problems * Fix some problems with email sending * Remove some dead code * Add a way to control spawn priority, by default , in order, it is : authme,essentials,multiverse,default
62 lines
1.1 KiB
Java
62 lines
1.1 KiB
Java
package fr.xephi.authme.datasource;
|
|
|
|
import java.util.List;
|
|
|
|
import fr.xephi.authme.cache.auth.PlayerAuth;
|
|
|
|
|
|
public interface DataSource {
|
|
|
|
public enum DataSourceType {
|
|
|
|
MYSQL, FILE, SQLITE
|
|
}
|
|
|
|
boolean isAuthAvailable(String user);
|
|
|
|
PlayerAuth getAuth(String user);
|
|
|
|
boolean saveAuth(PlayerAuth auth);
|
|
|
|
boolean updateSession(PlayerAuth auth);
|
|
|
|
boolean updatePassword(PlayerAuth auth);
|
|
|
|
int purgeDatabase(long until);
|
|
|
|
List<String> autoPurgeDatabase(long until);
|
|
|
|
boolean removeAuth(String user);
|
|
|
|
boolean updateQuitLoc(PlayerAuth auth);
|
|
|
|
int getIps(String ip);
|
|
|
|
List<String> getAllAuthsByName(PlayerAuth auth);
|
|
|
|
List<String> getAllAuthsByIp(String ip);
|
|
|
|
List<String> getAllAuthsByEmail(String email);
|
|
|
|
boolean updateEmail(PlayerAuth auth);
|
|
|
|
boolean updateSalt(PlayerAuth auth);
|
|
|
|
void close();
|
|
|
|
void reload();
|
|
|
|
void purgeBanned(List<String> banned);
|
|
|
|
DataSourceType getType();
|
|
|
|
boolean isLogged(String user);
|
|
|
|
void setLogged(String user);
|
|
|
|
void setUnlogged(String user);
|
|
|
|
void purgeLogged();
|
|
|
|
}
|