Displaying OpenAudioMc variables with PlaceholderAPI
This document explains how to use the PlaceholderAPI integration to show OpenAudioMc values in chat, scoreboard, tablist and similar places. Placeholders are evaluated on your Spigot server only and cannot be used inside BungeeCord configuration files.
Overview
When players connect the OpenAudioMc plugin exposes a set of placeholders you can reference from any plugin or layout that supports PlaceholderAPI. You may adjust the exact text or formatting for some entries in the plugin config.yml file.
Available placeholders
%oa_is_connected%: Shows whether the player is connected to the web client. Example valueConnected%oa_is_in_voicechat%: Shows whether the player is currently in voice chat. Example valueConnected%oa_client_count%: Number of players capable of listening to music. Example value5%oa_voicechat_count%: Number of players currently using voice chat. Example value30%oa_voicechat_limit%: Maximum number of players allowed to use voice chat. Example value100%oa_voicechat_peers%: Number of players currently in voice chat range for this player. Example value5%oa_token%: The current session token for the player. Example value123456
Usage examples
Use the placeholders inside any PlaceholderAPI compatible format string. Example scoreboard line:
Example for chat plugin placeholder format:
Now playing for you : %oa_client_count% listeners
Update frequency and behavior
Values are resolved on demand. That means placeholders may only update when the tablist, scoreboard or chat component itself refreshes. If you expect rapid updates make sure the target component is configured to refresh at the interval you need.
Configuration
Edit config.yml to tweak friendly labels or formatting that the plugin uses when exposing these values server side. Changes may require a reload or a server restart to take effect.
Troubleshooting
- If a placeholder returns nothing check that PlaceholderAPI is installed and that the OpenAudioMc expansion is enabled.
- If values look out of date verify the component using the placeholder is refreshing at the frequency you expect.
If you want I can convert these examples into a short snippet ready for your docs site or push this file into your repository as a new documentation page.
