Skip to content

Commit

Permalink
Add extra debug to limit monthly votes
Browse files Browse the repository at this point in the history
  • Loading branch information
BenCodez committed Oct 2, 2024
1 parent b7942e7 commit e391ba8
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,10 @@ public void onplayerVote(PlayerVoteEvent event) {
}
LocalDateTime cTime = plugin.getTimeChecker().getTime();
int days = cTime.getDayOfMonth();
plugin.extraDebug("Current day of month: " + days + " Current total: " + value);
if (value >= days * plugin.getVoteSitesEnabled().size()) {
plugin.debug("Detected higher month total, changing. Current Total: " + value + " Days: " + days
+ " New Total: " + days * plugin.getVoteSitesEnabled().size());
user.setTotal(TopVoter.Monthly, days * plugin.getVoteSitesEnabled().size());
}
}
Expand Down

0 comments on commit e391ba8

Please sign in to comment.