From bd5234b479fd32736cf3645f9d19e336304ef47c Mon Sep 17 00:00:00 2001 From: BenCodez Date: Sat, 16 Mar 2024 14:58:04 -0400 Subject: [PATCH] Adjustments to vote delay daily can vote caculations --- .../src/com/bencodez/votingplugin/user/VotingPluginUser.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VotingPlugin/src/com/bencodez/votingplugin/user/VotingPluginUser.java b/VotingPlugin/src/com/bencodez/votingplugin/user/VotingPluginUser.java index ecdc6aaea..d908cacc3 100644 --- a/VotingPlugin/src/com/bencodez/votingplugin/user/VotingPluginUser.java +++ b/VotingPlugin/src/com/bencodez/votingplugin/user/VotingPluginUser.java @@ -278,8 +278,8 @@ public boolean canVoteSite(VoteSite voteSite) { return now.isAfter(nextvote); } else { - LocalDateTime resetTime = plugin.getTimeChecker().getTime().withHour(voteSite.getVoteDelayDailyHour()) - .withMinute(0).withSecond(0); + LocalDateTime resetTime = lastVote.withHour(voteSite.getVoteDelayDailyHour()).withMinute(0) + .withSecond(0); LocalDateTime resetTimeTomorrow = resetTime.plusHours(24); if (ChronoUnit.HOURS.between(lastVote, resetTime) > 24) {