From dc3c605315498c077fadf65db9023fcaee6050be Mon Sep 17 00:00:00 2001 From: BenCodez Date: Sun, 31 Dec 2023 15:22:44 -0500 Subject: [PATCH] Bypass fake votes for WaitUntilVoteDelay --- .../votingplugin/listeners/PlayerVoteListener.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/VotingPlugin/src/com/bencodez/votingplugin/listeners/PlayerVoteListener.java b/VotingPlugin/src/com/bencodez/votingplugin/listeners/PlayerVoteListener.java index 3800ac790..c63b7c0d7 100644 --- a/VotingPlugin/src/com/bencodez/votingplugin/listeners/PlayerVoteListener.java +++ b/VotingPlugin/src/com/bencodez/votingplugin/listeners/PlayerVoteListener.java @@ -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; + } } }