Switch UUID in PlexPlayer to an actual UUID and fix notes

This commit is contained in:
2022-04-06 22:55:01 -05:00
parent 00d00eb4e5
commit 5012d0478b
11 changed files with 70 additions and 43 deletions

View File

@ -209,7 +209,7 @@ public class SQLPlayerData
statement.setLong(6, player.getCoins());
statement.setBoolean(7, player.isVanished());
statement.setBoolean(8, player.isCommandSpy());
statement.setString(9, player.getUuid());
statement.setString(9, player.getUuid().toString());
statement.executeUpdate();
}
catch (SQLException throwables)
@ -229,7 +229,7 @@ public class SQLPlayerData
try (Connection con = Plex.get().getSqlConnection().getCon())
{
PreparedStatement statement = con.prepareStatement(INSERT);
statement.setString(1, player.getUuid());
statement.setString(1, player.getUuid().toString());
statement.setString(2, player.getName());
statement.setString(3, player.getLoginMessage());
statement.setString(4, player.getPrefix());

View File

@ -79,7 +79,7 @@ public class SQLNotes
try (Connection con = Plex.get().getSqlConnection().getCon())
{
PreparedStatement statement = con.prepareStatement(INSERT);
statement.setInt(1, notes.size());
statement.setInt(1, notes.size() + 1);
statement.setString(2, note.getUuid().toString());
statement.setString(3, note.getWrittenBy().toString());
statement.setString(4, note.getNote());