UUID migration bug fix for database mode.

This commit is contained in:
ryanhamshire 2015-02-04 16:21:26 -08:00
parent 10d2735ae3
commit e7e16e88fd

View File

@ -197,10 +197,18 @@ public class DatabaseDataStore extends DataStore
this.refreshDataConnection(); this.refreshDataConnection();
for(String name : changes.keySet()) for(String name : changes.keySet())
{
try
{ {
statement = this.databaseConnection.createStatement(); statement = this.databaseConnection.createStatement();
statement.execute("UPDATE griefprevention_playerdata SET name = '" + changes.get(name).toString() + "' WHERE name = '" + name + "';"); statement.execute("UPDATE griefprevention_playerdata SET name = '" + changes.get(name).toString() + "' WHERE name = '" + name + "';");
} }
catch(SQLException e)
{
GriefPrevention.AddLogEntry("Unable to convert player data for " + name + ". Skipping.");
GriefPrevention.AddLogEntry(e.getMessage());
}
}
} }
catch(SQLException e) catch(SQLException e)
{ {