Skip to content

Commit

Permalink
Bypass fake votes for WaitUntilVoteDelay
Browse files Browse the repository at this point in the history
  • Loading branch information
BenCodez committed Dec 31, 2023
1 parent 5abc800 commit dc3c605
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,17 @@ public void onplayerVote(PlayerVoteEvent event) {
}

if (voteSite.isWaitUntilVoteDelay() && !user.canVoteSite(voteSite)) {
if (user.hasPermission("VotingPlugin.BypassWaitUntilVoteDelay")) {
if (!event.isRealVote()) {
plugin.getLogger()
.info(user.getPlayerName() + " has bypass permission for WaitUntilVoteDelay, bypassing");
.info(user.getPlayerName() + " did a not real vote, bypassing WaitUntilVoteDelay");
} else {
plugin.getLogger().info(user.getPlayerName() + " must wait until votedelay is over, ignoring vote");
return;
if (user.hasPermission("VotingPlugin.BypassWaitUntilVoteDelay")) {
plugin.getLogger()
.info(user.getPlayerName() + " has bypass permission for WaitUntilVoteDelay, bypassing");
} else {
plugin.getLogger().info(user.getPlayerName() + " must wait until votedelay is over, ignoring vote");
return;
}
}
}

Expand Down

0 comments on commit dc3c605

Please sign in to comment.