mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-12-01 17:36:46 +01:00
Update player name in case it has changed.
TODO: Check for double names if that happens? In general?
This commit is contained in:
parent
a886657e14
commit
03b1335c97
@ -483,6 +483,18 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
try {
|
||||
PlayerProfile ret = loadFromResult(playerName, result);
|
||||
result.close();
|
||||
|
||||
if (!playerName.equals("") && !ret.getPlayerName().equals("")) {
|
||||
statement = connection.prepareStatement(
|
||||
"UPDATE `" + tablePrefix + "users` "
|
||||
+ "SET user = ? "
|
||||
+ "WHERE UUID = ?");
|
||||
statement.setString(1, playerName);
|
||||
statement.setString(2, uuid);
|
||||
result = statement.executeQuery();
|
||||
result.close();
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
catch (SQLException e) {
|
||||
|
Loading…
Reference in New Issue
Block a user