Little changes (look comments)

This commit is contained in:
Lukas
2015-01-10 15:28:30 +01:00
parent 6c8f3ac43a
commit a04a241d17

View File

@@ -41,6 +41,7 @@ public class VotifierListener implements Listener, PluginMessageListener {
if (!rs1.next()) {
return;
}
int money = 25;
addPlayerMoney(25, vote);
int playerId;
playerId = rs1.getInt("id");
@@ -52,7 +53,7 @@ public class VotifierListener implements Listener, PluginMessageListener {
if (lastVoteDate > ((System.currentTimeMillis() / 1000) - (60 * 60 * 24))) {
votesInRow++;
if (votesInRow == 10) {
addPlayerMoney(50, vote);
money += 50;
votesInRow = 0;
}
} else {
@@ -62,6 +63,7 @@ public class VotifierListener implements Listener, PluginMessageListener {
} else {
Core.getMySql().queryUpdate("INSERT INTO `voteUsers`(`playerId`, `dateOfLastVote`, `votesInARow`) VALUES (SELECT id FROM `players` WHERE name = '" + vote.getUsername() + "'," + timestampInt + ",1)");
}
addPlayerMoney(money, vote);
} catch (SQLException ex) {
Errors.reportException(ex);
}