Little changes (look comments)

This commit is contained in:
Lukas
2015-01-09 15:46:41 +01:00
parent a2d91f0bd2
commit 6c8f3ac43a

View File

@@ -49,7 +49,7 @@ public class VotifierListener implements Listener, PluginMessageListener {
int lastVoteDate = rs2.getInt("dateOfLastVote"); int lastVoteDate = rs2.getInt("dateOfLastVote");
int votesInRow; int votesInRow;
votesInRow = rs2.getInt("votesInARow"); votesInRow = rs2.getInt("votesInARow");
if (lastVoteDate > ((System.currentTimeMillis() / 1000) - (60*60*24))) { if (lastVoteDate > ((System.currentTimeMillis() / 1000) - (60 * 60 * 24))) {
votesInRow++; votesInRow++;
if (votesInRow == 10) { if (votesInRow == 10) {
addPlayerMoney(50, vote); addPlayerMoney(50, vote);
@@ -113,12 +113,11 @@ public class VotifierListener implements Listener, PluginMessageListener {
String playername = in.readUTF(); String playername = in.readUTF();
Player p = Bukkit.getPlayer(playername); Player p = Bukkit.getPlayer(playername);
int money = Integer.parseInt(in.readUTF()); int money = Integer.parseInt(in.readUTF());
Money.payMoney(p, money); Core.statusMsg(p, "Vote_Normal", Boolean.TRUE);
if (money == 25) { if (money == 75) {
Core.getl("Vote_Normal", p); Core.statusMsg(p, "Vote_10_Times", true);
} else if (money == 50) {
Core.getl("Vote_10_Times", p);
} }
Money.payMoney(p, money);
} }
} catch (IOException ex) { } catch (IOException ex) {
Errors.reportException(ex); Errors.reportException(ex);