Skip to content

Commit

Permalink
Added votesrequired placeholder to broadcasts
Browse files Browse the repository at this point in the history
  • Loading branch information
BenCodez committed Mar 16, 2024
1 parent c3df294 commit cca9e3d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ public void broadcastVote(VotingPluginUser user, boolean checkBungee) {
(user.getPlayer() != null) ? user.getPlayer().getDisplayName() : user.getPlayerName());
placeholders.put("sitename", getDisplayName());
placeholders.put("servicesite", getServiceSite());
placeholders.put("votesrequired", "" + plugin.getVoteParty().getVotesRequired());
bc = StringParser.getInstance().replacePlaceHolder(bc, placeholders);
bc = StringParser.getInstance().replacePlaceHolders(user.getOfflinePlayer(), bc);
ArrayList<Player> players = new ArrayList<Player>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ public boolean canVoteSite(VoteSite voteSite) {
.withMinute(0).withSecond(0);
LocalDateTime resetTimeTomorrow = resetTime.plusHours(24);

if (ChronoUnit.HOURS.between(lastVote, resetTime) > voteSite.getVoteDelay()) {
if (ChronoUnit.HOURS.between(lastVote, resetTime) > 24) {
if (now.isAfter(resetTime)) {
return true;
}
Expand Down

0 comments on commit cca9e3d

Please sign in to comment.