Skip to content

Fabric — PlaceholderAPI

MateoF24 edited this page Aug 15, 2026 · 4 revisions

Fabric — PlaceholderAPI

If PlaceholderAPI is installed, OnTime registers placeholders other mods and plugins can substitute into their own text — scoreboards, tab lists, chat formatters, holograms.

Fabric only. It is detected at startup and skipped when absent; nothing needs configuring either way.

The placeholders

All under the ontime namespace:

%ontime:count% how many executions are running on the server
%ontime:my_count% how many the player reading it can see
%ontime:timer_exists% whether a timer by that name exists
%ontime:timer_running% whether it is running
%ontime:timer_time% its clock, formatted
%ontime:timer_seconds% the same in seconds
%ontime:timer_percent% how far through it is

The ones about a timer take its name after a slash:

%ontime:timer_time/round%
%ontime:timer_running/speedrun%

Which execution they read

A timer can be running many times at once, and a placeholder is one piece of text, so timer_time and the rest answer for the oldest execution in flight. That pick is arbitrary but stable: it does not change under you while that execution lasts.

%ontime:my_count% is the one that reads the player, and it counts the executions whose audience includes them.

If you need to be precise about which execution, read the API or the WebSocket Integration instead — both name every execution by its id.

Examples

A tab list header:

Round: %ontime:timer_time/round%

A scoreboard line that only appears while something is running, using your formatter's own conditionals around:

%ontime:count% timers running

Adding your own

Other mods can register a placeholder of their own through the API:

OnTimeAPI.getInstance().registerTimerPlaceholder("half", timer ->
        String.valueOf(timer.getTargetTicks() / 40));

That makes {half} available inside timer commands — see Timer Commands.

Clone this wiki locally