TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/iFamishedX/HungerBridge/llms.txt
Use this file to discover all available pages before exploring further.
/v2/players endpoint returns the total number of players currently online and a list of their display names. When the online player count exceeds the configured players.max-list limit, the list is truncated but the count field always reflects the true total. This makes it easy to detect that more players are online than the list shows, without needing to fetch them in pages.
Request
Method:GETPath:
/v2/players
Headers
| Header | Required | Description |
|---|---|---|
X-Auth-Key | Yes | Authentication key from config.yaml → auth.key |
Configuration
This endpoint can be disabled inconfig.yaml under v2-endpoints.players. It is enabled by default.
The maximum number of player names returned in the players array is controlled by players.max-list. The default is 50.
Response
Always
true on success.The total number of players currently online at the moment the request was processed. This value is taken before any truncation, so it may be greater than the number of entries in the
players array when more players are online than players.max-list allows.An array of player name strings. The list is capped at
players.max-list entries (default 50). When more players are online than the limit, the first max-list names from the server’s online-player collection are returned.- Fabric: Names are collected from
server.getPlayerList().getPlayers()and converted to strings viaplayer.getName().getString(). - Paper: Names are collected from
Bukkit.getOnlinePlayers()and retrieved viaplayer.getName().
[]) when no players are online.Example Response — Players Online
Example Response — No Players Online
Example Response — List Truncated
When 75 players are online butplayers.max-list is 50:
When
count is greater than the length of players, the list has been truncated. The count field always reflects the true total regardless of the limit. Adjust players.max-list in config.yaml to raise or lower the cap.Error Responses
| Status | error field | Cause |
|---|---|---|
401 | unauthorized | Missing or incorrect X-Auth-Key header |
403 | forbidden | Endpoint disabled via v2-endpoints.players: false |
405 | method_not_allowed | Request method was not GET |