1
0
mirror of https://github.com/mcMMO-Dev/mcMMO.git synced 2026-02-18 17:53:00 +01:00

Merge branch 'master' of github.com:mcMMO-Dev/mcMMO into configurable

This commit is contained in:
nossr50
2019-05-29 14:06:55 -07:00
20 changed files with 269 additions and 160 deletions

View File

@@ -176,7 +176,7 @@ public final class SQLDatabaseManager implements DatabaseManager {
mcMMO.p.getLogger().info("Purged " + purged + " users from the database.");
}
public boolean removeUser(String playerName) {
public boolean removeUser(String playerName, UUID uuid) {
boolean success = false;
Connection connection = null;
PreparedStatement statement = null;
@@ -202,12 +202,20 @@ public final class SQLDatabaseManager implements DatabaseManager {
}
if (success) {
if(uuid != null)
cleanupUser(uuid);
Misc.profileCleanup(playerName);
}
return success;
}
public void cleanupUser(UUID uuid) {
if(cachedUserIDs.containsKey(uuid))
cachedUserIDs.remove(uuid);
}
public boolean saveUser(PlayerProfile profile) {
boolean success = true;
PreparedStatement statement = null;