Update playername in database when a name changes

This commit is contained in:
TfT_02 2014-07-12 15:59:56 +02:00
parent 792f21bc20
commit 072e7c8b19

View File

@ -412,6 +412,12 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
continue;
}
// Update playerName in database after name change
if (!character[0].equalsIgnoreCase(playerName)) {
mcMMO.p.debug("Name change detected: " + character[0] + " => " + playerName);
character[0] = playerName;
}
return loadFromLine(character);
}