Skip to content

Commit

Permalink
Add option to reset extra votes required weekly
Browse files Browse the repository at this point in the history
  • Loading branch information
BenCodez committed Dec 31, 2023
1 parent bf1e971 commit 5abc800
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion VotingPlugin/Resources/SpecialRewards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ VoteParty:
OnlyOncePerDay: false
# If true, will give voteparty once per week only
OnlyOncePerWeek: false
# Reset extra votes
# Reset extra votes weekly
ResetExtraVotesWeekly: false
# Reset extra votes monthly
ResetExtraVotesMonthly: false
# Count votes from /av vote?
CountFakeVotes: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ public class SpecialRewardsConfig extends YMLFile {
@ConfigDataBoolean(path = "VoteParty.ResetExtraVotesMonthly")
@Getter
private boolean votePartyResetExtraVotesMonthly = false;

@ConfigDataBoolean(path = "VoteParty.ResetExtraVotesWeekly")
@Getter
private boolean votePartyResetExtraVotesWeekly = false;

@ConfigDataString(path = "VoteParty.VoteReminderBroadcast")
@Getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,10 @@ public void onWeekChange(WeekChangeEvent event) {
if (plugin.getSpecialRewardsConfig().isVotePartyResetWeekly()) {
reset(true);
}

if (plugin.getSpecialRewardsConfig().isVotePartyResetExtraVotesWeekly()) {
plugin.getServerData().setVotePartyExtraRequired(0);
}
}

public void register() {
Expand Down

0 comments on commit 5abc800

Please sign in to comment.