Skip to content

Commit

Permalink
Ignore daily total for max amount of votes per day option
Browse files Browse the repository at this point in the history
  • Loading branch information
BenCodez committed Oct 8, 2023
1 parent bd5532a commit ea646b8
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
1 change: 1 addition & 0 deletions VotingPlugin/Resources/bungeeconfig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ VoteCacheTime: -1
# Maxium number of votes possible per day
# Usually matches the amount of votesites
# Will limit vote totals to match accordingly
# Only applies for month total
# Set to -1 to disable
MaxAmountOfVotesPerDay: -1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1270,10 +1270,6 @@ public synchronized void vote(String player, String service, boolean realVote, b

int maxVotes = getConfig().getMaxAmountOfVotesPerDay();
if (maxVotes > 0) {
if (dailyTotal > maxVotes) {
dailyTotal = maxVotes;

}
LocalDateTime cTime = getBungeeTimeChecker().getTime();
int days = cTime.getDayOfMonth();
if (monthTotal > days * maxVotes) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1306,9 +1306,6 @@ public synchronized void vote(String player, String service, boolean realVote, b

int maxVotes = getConfig().getMaxAmountOfVotesPerDay();
if (maxVotes > 0) {
if (dailyTotal > maxVotes) {
dailyTotal = maxVotes;
}
LocalDateTime cTime = getBungeeTimeChecker().getTime();
int days = cTime.getDayOfMonth();
if (monthTotal > days * maxVotes) {
Expand Down

0 comments on commit ea646b8

Please sign in to comment.