mc.pvpers.us
Online
← The Frontier Suite

FrontierStatsAPI

v1.16.0Infrastructure

A read-only HTTP/JSON API baked into the server so a website or bot can show live stats without RCON, FTP or a database.

What it does

Starts a small HTTP server on its own port and answers GET requests with server status, player summaries, leaderboards (playtime with all/week/month windows, deaths, XP, mob kills, blocks and ores mined, distance, advancements, mcMMO power level), per-player advancement and mcMMO skill detail, and everything the other Frontier plugins keep on disk — border, reputation, events/PvP, shop, economy.

Its defining decision is that it reads sibling plugins off disk, not through their APIs: FrontierTab’s YAML files, SQLite databases opened read-only, EssentialsX userdata — so a sibling being disabled or on an older version degrades a route to an omitted field or a 503, never a crash. It is cheap by design (one JSON parse per player instead of ~1,100 statistic calls, cached baltop and advancement catalog) and includes a CORS allow-list, per-IP rate limiting and preflight handling.

Requires & integrates with

Required
Paper 26.2+, Java 25+, FrontierTab — its per-player files are the player index, so there are no players, leaderboards or today-stats without it. sqlite-jdbc is downloaded automatically at first boot (needs outbound internet once).
Optional
FrontierBorder (/api/border) · FrontierReputation (/api/reputation/*) · FrontierEvents (/api/events/*) · FrontierShop (/api/shop/*) · mcMMO (/api/players/{uuid}/skills and the power_level leaderboard) · EssentialsX (/api/economy/baltop; discovered by folder, not declared)
Used by
Nothing in-game — consumers are websites and bots. This site is the reference consumer.

Heads up: this plugin will not enable without FrontierTabinstalled. Everything else listed as optional is genuinely optional — the feature simply doesn't appear.

Commands

CommandWhoWhat it does
/statsapi reloadAdminRe-read config.yml (rate limit, ores list, CORS origins); port changes still need a restart
/statsapi resetdeathsAdminPrints a warning and does nothing
/statsapi resetdeaths confirmAdminReset every player’s vanilla minecraft:deaths statistic to 0 (online via the API, offline by rewriting their stats file); note this is *not* the deaths number the API serves

Permissions

Player features default to true, staff features to op. Every node follows frontier.<plugin>.<action>, so a LuckPerms setup is e.g. lp group default permission set frontier.shop.use true. Wildcards work: frontier.reputation.*.

NodeDefaultGrants
frontier.statsapi.adminop/statsapi reload and /statsapi resetdeaths

Config reference

File

plugins/FrontierStatsAPI/config.yml

To apply changes

/statsapi reload — everything except port, which needs a restart

KeyDefaultWhat it controls
port17249HTTP listener port; binds all interfaces; read once at enable
allowed-origins["https://example.com", "http://localhost:3000"]CORS allow-list — an Origin header that exactly matches an entry gets it echoed back; anything else gets no CORS header (browsers block, curl doesn’t care)
rate-limit60Max requests per client IP per fixed 60-second window; over it returns 429
ores19 materials (coal → ancient debris, incl. deepslate and nether variants)Bukkit Material names that count toward ?stat=ores_mined; unknown names log a warning and are skipped (blocks_mined needs no list)

HTTP routes

Base URL http://<host>:<port>, all GET, all JSON. Full route parameters, response shapes and error cases are in docs/API.md in the repo.

GroupRoutesNeeds
Server/api/server, /api/plugins
Players/api/players, /api/players/{uuid}, /api/players/{uuid}/advancements, /api/players/{uuid}/skillsFrontierTab; world advancement files; mcMMO for skills
Leaderboards/api/leaderboard?stat=&window=&limit=FrontierTab (+ mcMMO for power_level)
Border/api/borderFrontierBorder
Economy/api/economy/baltop?limit=EssentialsX userdata
Reputation/api/reputation/leaderboard/{outlaws|peaceful|violence|lawmen|donors|streaks}, /api/reputation/{wanted|economy|donations|recent}, /api/reputation/player/{name}FrontierReputation
Events/api/events/{leaderboard|categories|recent|summary|live}, /api/events/loot/recent, /api/events/run/{id}, /api/events/player/{nameOrUuid}FrontierEvents
PvP/api/events/pvp/{leaderboard|recent}, /api/events/pvp/player/{nameOrUuid}FrontierEvents
Shop/api/shop/{catalog|market|deals|history}FrontierShop

Good to know

  • +There is no authentication and no bind-address option. Everything served is public-leaderboard grade, but /api/reputation/wanted includes last-seen coordinates and /api/plugins lists every installed plugin and version — put it behind a reverse proxy or firewall if that matters.
  • +The deaths field is FrontierTab’s own counter (excludes event-arena deaths). /statsapi resetdeaths zeroes the vanilla statistic, which no route reads — use /tab reset <player> deaths for the number the API shows.
  • +A 503 … not available on an events or reputation sub-route usually means the sibling is on an older build that hasn’t created that table or column yet; upgrade it and the flag latches the first time the schema is seen.
  • +"Address already in use" at boot means another process holds the port — the plugin still enables but serves nothing until you change port and restart.
  • +Day boundaries (today_*, streaks, shop deals) use the JVM timezone; FrontierBorder’s server-timezone sets that for the whole server.

Looking for something specific? Search the whole suite.