Skip to main content

PlaceholderAPI

CocoKOTH integrates with PlaceholderAPI to provide useful placeholders for scoreboards, holograms, and other plugins.

Requirements


Global Placeholders

PlaceholderDescription
%cocokoth_active%List of active KOTHs
%cocokoth_active_count%Number of active KOTHs

KOTH-Specific Placeholders

Replace <koth> with the KOTH name:

PlaceholderDescription
%cocokoth_<koth>_active%Is KOTH active (true/false)
%cocokoth_<koth>_capturer%Current capturer name
%cocokoth_<koth>_timeleft%Time remaining (formatted)
%cocokoth_<koth>_displayname%KOTH display name
%cocokoth_<koth>_world%World name
%cocokoth_<koth>_x%Center X coordinate
%cocokoth_<koth>_y%Center Y coordinate
%cocokoth_<koth>_z%Center Z coordinate

Leaderboard Placeholders

PlaceholderDescription
%cocokoth_top_1%Player at #1 position
%cocokoth_top_2%Player at #2 position
%cocokoth_top_3%Player at #3 position
%cocokoth_top_<position>%Player at specified position
%cocokoth_wins%Player's total wins

In-KOTH Placeholders

These work in scoreboard/bossbar/hologram configurations:

PlaceholderDescription
%displayName%KOTH display name
%capturer%Current capturer (formatted)
%capturer_raw%Current capturer (plain)
%timeLeft_formatted%Capture time remaining
%maxTimeLeft_formatted%Max time remaining
%timeTaken_formatted%Time elapsed
%score%Player's current score
%score_X_player%Player at position X
%score_X_points%Score at position X
%x%, %y%, %z%KOTH coordinates
%world%World name

Placeholder Configuration

Configure how placeholders display when no data is available:

plugins/CocoKoth/config.yml
placeholders:
not-active: "&#FF8000---&f"
not-found: "&#FF8000Unknown koth&f"
no-hook: "&#FF8000No team hook loaded&f"
not-in-team: "&#FF8000---&f"
no-capturer: "&#FF8000---&f"
infinity: "&#FF8000∞&f"

Example Usage

Hologram Display

%cocokoth_spawn_displayname%
Capturer: %cocokoth_spawn_capturer%
Time Left: %cocokoth_spawn_timeleft%

Leaderboard Sign

Top KOTH Winners:
1. %cocokoth_top_1%
2. %cocokoth_top_2%
3. %cocokoth_top_3%