TDXDevelopment
TDX VotePlus

Placeholders

Every PlaceholderAPI placeholder exposed by TDX VotePlus, grouped by use case, with copy-paste examples.

TDX VotePlus registers a PlaceholderAPI expansion under the identifier tdxvoteplus as soon as PlaceholderAPI is on the server. Every placeholder below is prefixed with %tdxvoteplus_ and closed with %.

Drop PlaceholderAPI in and the expansion registers itself on startup - you should see [TDXVotePlus] PlaceholderAPI detected, placeholders registered. in the console. No /papi ecloud download step, the expansion is bundled inside the plugin.

Player counters

These read the viewing player's current vote totals. Return 0 if the player has never voted or isn't in the counter cache (no main-thread DB hits, the expansion is always async-safe).

PlaceholderReturns
%tdxvoteplus_total%All-time vote count
%tdxvoteplus_monthly%Votes this month (rolls over at month boundary in configured timezone)
%tdxvoteplus_weekly%Votes this week
%tdxvoteplus_daily%Votes today
%tdxvoteplus_name%The player's name as recorded in the players table

Example, chat format line

tab / chat-format.yml
format: "&7[&e%tdxvoteplus_total% votes&7] &f%player_name%&7: &f{message}"

Streaks

PlaceholderReturns
%tdxvoteplus_streak%Current consecutive-day vote streak
%tdxvoteplus_streak_best%All-time best streak (the player's personal record)

Example, scoreboard line

scoreboard.yml
lines:
  - "&e&lSTREAK"
  - "&f%tdxvoteplus_streak% days"
  - "&7best: %tdxvoteplus_streak_best%"

Ranks

Returns the viewing player's position on the leaderboard for that period, or - if they aren't in the top-N snapshot. Ranks are looked up from the cached leaderboard, not live DB, so the number only updates when the leaderboard refreshes (every refresh-seconds seconds, default 120; see Leaderboard config).

PlaceholderReturns
%tdxvoteplus_rank_total%Rank on the all-time leaderboard
%tdxvoteplus_rank_monthly%Rank on the monthly leaderboard

Example, tab suffix

tab / groups.yml
default:
  tabsuffix: "&8[&6#%tdxvoteplus_rank_total%&8]"

Top-N leaderboard

Pull arbitrary positions from any leaderboard period, for both name and vote count. N is 1-indexed; top_..._n_0 does not exist. Missing slots return an empty string for name and 0 for votes.

PlaceholderReturns
%tdxvoteplus_top_total_name_<N>%Name at position N on all-time leaderboard
%tdxvoteplus_top_total_votes_<N>%Vote count at position N
%tdxvoteplus_top_monthly_name_<N>%Name at position N this month
%tdxvoteplus_top_monthly_votes_<N>%Votes at position N this month
%tdxvoteplus_top_weekly_name_<N>%Name at position N this week
%tdxvoteplus_top_weekly_votes_<N>%Votes at position N this week
%tdxvoteplus_top_daily_name_<N>%Name at position N today
%tdxvoteplus_top_daily_votes_<N>%Votes at position N today

Example, spawn hologram (DecentHolograms)

plugins/DecentHolograms/holograms/top-voters.yml
location: world,100.5,80.0,200.5
lines:
  - "&6&l⭐ TOP VOTERS THIS MONTH ⭐"
  - ""
  - "&e&l#1 &f%tdxvoteplus_top_monthly_name_1% &7- &a%tdxvoteplus_top_monthly_votes_1% votes"
  - "&7&l#2 &f%tdxvoteplus_top_monthly_name_2% &7- &a%tdxvoteplus_top_monthly_votes_2% votes"
  - "&c&l#3 &f%tdxvoteplus_top_monthly_name_3% &7- &a%tdxvoteplus_top_monthly_votes_3% votes"
  - ""
  - "&7You're rank &f#%tdxvoteplus_rank_monthly%"

Vote party

Global across the whole server (or the whole MySQL cluster if you share a database without mysql.server-id set). These don't need a player, so they work in console messages, holograms, and server-wide broadcasts.

PlaceholderReturns
%tdxvoteplus_party_counter%Current vote-party counter
%tdxvoteplus_party_threshold%Target counter value for the next party
%tdxvoteplus_party_remaining%threshold − counter, clamped to 0 (never negative)
%tdxvoteplus_party_total%Number of vote parties ever triggered

Example, global bossbar

bossbar plugin config
bossbars:
  party-progress:
    title: "&6Vote Party &7- &e%tdxvoteplus_party_counter%&7/&e%tdxvoteplus_party_threshold% &7(&c%tdxvoteplus_party_remaining% left!&7)"
    color: YELLOW
    style: SEGMENTED_10
    progress: "%math_0_{%tdxvoteplus_party_counter%/%tdxvoteplus_party_threshold%}%"

Testing placeholders

Run /papi parse <player> %tdxvoteplus_total% from console or in-game (the player must be online for counter placeholders, but top-N and party placeholders work with any player argument). A clean setup prints the numeric value; an expansion that didn't load prints the raw placeholder text.

> papi parse ToosieDX %tdxvoteplus_top_monthly_name_1%
ToosieDX
> papi parse ToosieDX %tdxvoteplus_party_counter%
47

If a placeholder returns its raw text (e.g. %tdxvoteplus_total% prints literally), PlaceholderAPI is installed but the expansion didn't register. Check /papi list for tdxvoteplus and run /voteplus reload, a misconfigured config.yml will cause the plugin to fail enable and skip expansion registration.