Skip to content

Commit

Permalink
Add votedelay and votehour placeholders
Browse files Browse the repository at this point in the history
  • Loading branch information
BenCodez committed Mar 6, 2024
1 parent 040fafe commit 36eb6ea
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ private ItemBuilder getItemVoteSite(VoteSite voteSite) {

if (user.canVoteSite(voteSite)) {
builder = new ItemBuilder(plugin.getGui().getChestVoteURLCanVoteItemSection());
builder.addPlaceholder("SericeSite", voteSite.getServiceSite());
builder.setName(
plugin.getGui().getChestVoteURLGUISiteNameCanVote().replace("%Name%", voteSite.getDisplayName()));
} else {
Expand All @@ -126,6 +125,8 @@ private ItemBuilder getItemVoteSite(VoteSite voteSite) {
plugin.getGui().getChestVoteURLNextVote().replace("%Info%", user.voteCommandNextInfo(voteSite)));
}
builder.addPlaceholder("SericeSite", voteSite.getServiceSite());
builder.addPlaceholder("VoteDelay", "" + voteSite.getVoteDelay());
builder.addPlaceholder("VoteHour", "" + voteSite.getVoteDelayDailyHour());

return builder;
}
Expand Down Expand Up @@ -208,6 +209,8 @@ public void onClick(ClickEvent event) {
placeholders.put("sitename", voteSite.getDisplayName());
placeholders.put("player", player.getName());
placeholders.put("servicesite", voteSite.getServiceSite());
placeholders.put("VoteDelay", "" + voteSite.getVoteDelay());
placeholders.put("VoteHour", "" + voteSite.getVoteDelayDailyHour());
user.sendMessage(plugin.getGui().getChestVoteURLURLText(), placeholders);

}
Expand Down

0 comments on commit 36eb6ea

Please sign in to comment.