Little changes (look comments)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user