|
@@ -78,7 +78,7 @@ public class MySQLPluginData extends PluginData{
|
|
playerData.getPayoutDataMap().forEach((payoutID, payoutData) -> {
|
|
playerData.getPayoutDataMap().forEach((payoutID, payoutData) -> {
|
|
try {
|
|
try {
|
|
PreparedStatement preparedStatement = connection
|
|
PreparedStatement preparedStatement = connection
|
|
- .prepareStatement("REPLACE INTO playerData (uuid, payout_id receivedToday, secondsSinceLastPayout, lastPayoutDate) VALUES (?, ?, ?, ? ,?)");
|
|
|
|
|
|
+ .prepareStatement("REPLACE INTO payoutData (uuid, payout_id receivedToday, secondsSinceLastPayout, lastPayoutDate) VALUES (?, ?, ?, ? ,?)");
|
|
preparedStatement.setString(1, uuid.toString());
|
|
preparedStatement.setString(1, uuid.toString());
|
|
preparedStatement.setInt(1, payoutID);
|
|
preparedStatement.setInt(1, payoutID);
|
|
preparedStatement.setDouble(2, payoutData.getReceivedToday());
|
|
preparedStatement.setDouble(2, payoutData.getReceivedToday());
|
|
@@ -114,7 +114,7 @@ public class MySQLPluginData extends PluginData{
|
|
try{
|
|
try{
|
|
PlayerData playerData = new PlayerData();
|
|
PlayerData playerData = new PlayerData();
|
|
// get data from DB
|
|
// get data from DB
|
|
- ResultSet result = connection.prepareStatement("SELECT * FROM playerData WHERE uuid='" + player.getUniqueId() + "'").executeQuery();
|
|
|
|
|
|
+ ResultSet result = connection.prepareStatement("SELECT * FROM payoutData WHERE uuid='" + player.getUniqueId() + "'").executeQuery();
|
|
while(result.next()) {
|
|
while(result.next()) {
|
|
UUID uuid = UUID.fromString(result.getString("uuid"));
|
|
UUID uuid = UUID.fromString(result.getString("uuid"));
|
|
int payoutID = result.getInt("payout_id");
|
|
int payoutID = result.getInt("payout_id");
|