mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2026-02-19 18:33:00 +01:00
Refactoring code part 1 to prep for adding a bunch of unit tests
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package com.gmail.nossr50.database;
|
||||
|
||||
import com.gmail.nossr50.api.exceptions.InvalidSkillException;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.database.DatabaseType;
|
||||
import com.gmail.nossr50.datatypes.database.PlayerStat;
|
||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||
@@ -15,15 +14,13 @@ import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
public interface DatabaseManager {
|
||||
// One month in milliseconds
|
||||
long PURGE_TIME = 2630000000L * Config.getInstance().getOldUsersCutoff();
|
||||
// During convertUsers, how often to output a status
|
||||
int progressInterval = 200;
|
||||
|
||||
/**
|
||||
* Purge users with 0 power level from the database.
|
||||
*/
|
||||
void purgePowerlessUsers();
|
||||
int purgePowerlessUsers();
|
||||
|
||||
/**
|
||||
* Purge users who haven't logged on in over a certain time frame from the database.
|
||||
@@ -76,6 +73,8 @@ public interface DatabaseManager {
|
||||
*/
|
||||
Map<PrimarySkillType, Integer> readRank(String playerName);
|
||||
|
||||
default void init() {};
|
||||
|
||||
/**
|
||||
* Add a new user to the database.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user