From 448a9eeea9ec19c392fbaabded13d8ce6b625175 Mon Sep 17 00:00:00 2001 From: BenCodez Date: Fri, 8 Mar 2024 18:48:52 -0500 Subject: [PATCH] Add placeholderapi placeholder %votingplugin_sitesavailable% --- .../bencodez/votingplugin/placeholders/PlaceHolders.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/VotingPlugin/src/com/bencodez/votingplugin/placeholders/PlaceHolders.java b/VotingPlugin/src/com/bencodez/votingplugin/placeholders/PlaceHolders.java index 65493324d..d6e5cbc6e 100644 --- a/VotingPlugin/src/com/bencodez/votingplugin/placeholders/PlaceHolders.java +++ b/VotingPlugin/src/com/bencodez/votingplugin/placeholders/PlaceHolders.java @@ -505,6 +505,14 @@ public String placeholderRequest(VotingPluginUser user, String identifier) { } }.withDescription("How long until user can vote on anysite").updateDataKey("LastVotes")); + placeholders.add(new PlaceHolder("SitesAvailable") { + + @Override + public String placeholderRequest(VotingPluginUser user, String identifier) { + return "" + user.getSitesNotVotedOn(); + } + }.withDescription("Get number of sites available to be voted on").updateDataKey("LastVotes")); + for (final VoteSite voteSite : plugin.getVoteSites()) { placeholders.add(new CalculatingPlaceholder("Next_" + voteSite.getKey()) {