Save and load profiles using UUIDs

fall back on usernames if neccesary
This commit is contained in:
TfT_02
2014-07-12 14:54:22 +02:00
parent e619e01c23
commit 792f21bc20
5 changed files with 37 additions and 26 deletions

View File

@ -360,6 +360,10 @@ public final class SQLDatabaseManager implements DatabaseManager {
return loadPlayerProfile("", uuid.toString(), create, true);
}
public PlayerProfile loadPlayerProfile(String playerName, UUID uuid, boolean create) {
return loadPlayerProfile(playerName, uuid.toString(), create, true);
}
private PlayerProfile loadPlayerProfile(String playerName, String uuid, boolean create, boolean retry) {
if (!checkConnected()) {
return new PlayerProfile(playerName, false); // return fake profile if not connected