From 36eb6eafb3947a3268501d5717bb808c0d90173e Mon Sep 17 00:00:00 2001 From: BenCodez Date: Tue, 5 Mar 2024 19:03:05 -0500 Subject: [PATCH] Add votedelay and votehour placeholders --- .../bencodez/votingplugin/commands/gui/player/VoteURL.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/VotingPlugin/src/com/bencodez/votingplugin/commands/gui/player/VoteURL.java b/VotingPlugin/src/com/bencodez/votingplugin/commands/gui/player/VoteURL.java index fc7499f4c..cd9b722c2 100644 --- a/VotingPlugin/src/com/bencodez/votingplugin/commands/gui/player/VoteURL.java +++ b/VotingPlugin/src/com/bencodez/votingplugin/commands/gui/player/VoteURL.java @@ -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 { @@ -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; } @@ -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); }