1
0
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:
nossr50
2021-04-08 10:39:07 -07:00
parent 0636f578dd
commit 5080d86e44
115 changed files with 993 additions and 970 deletions

View File

@@ -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.
*