Skip to content

Commit

Permalink
Adjustments to vote delay daily can vote caculations
Browse files Browse the repository at this point in the history
  • Loading branch information
BenCodez committed Mar 16, 2024
1 parent cca9e3d commit bd5234b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit bd5234b

Please sign in to comment.