FrontierStatsAPI
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-jdbcis 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}/skillsand thepower_levelleaderboard) · 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
| Command | Who | What it does |
|---|---|---|
| /statsapi reload | Admin | Re-read config.yml (rate limit, ores list, CORS origins); port changes still need a restart |
| /statsapi resetdeaths | Admin | Prints a warning and does nothing |
| /statsapi resetdeaths confirm | Admin | Reset 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.*.
| Node | Default | Grants |
|---|---|---|
| frontier.statsapi.admin | op | /statsapi reload and /statsapi resetdeaths |
Config reference
File
plugins/FrontierStatsAPI/config.yml
To apply changes
/statsapi reload — everything except port, which needs a restart
| Key | Default | What it controls |
|---|---|---|
| port | 17249 | HTTP 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-limit | 60 | Max requests per client IP per fixed 60-second window; over it returns 429 |
| ores | 19 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.
| Group | Routes | Needs |
|---|---|---|
| Server | /api/server, /api/plugins | — |
| Players | /api/players, /api/players/{uuid}, /api/players/{uuid}/advancements, /api/players/{uuid}/skills | FrontierTab; world advancement files; mcMMO for skills |
| Leaderboards | /api/leaderboard?stat=&window=&limit= | FrontierTab (+ mcMMO for power_level) |
| Border | /api/border | FrontierBorder |
| 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/wantedincludes last-seen coordinates and/api/pluginslists every installed plugin and version — put it behind a reverse proxy or firewall if that matters. - +The
deathsfield is FrontierTab’s own counter (excludes event-arena deaths)./statsapi resetdeathszeroes the vanilla statistic, which no route reads — use/tab reset <player> deathsfor the number the API shows. - +A
503 … not availableon 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
portand restart. - +Day boundaries (
today_*, streaks, shop deals) use the JVM timezone; FrontierBorder’sserver-timezonesets that for the whole server.
← Previous
FrontierEvents
Event engine: Boss Rush raids, the Gauntlet, keystone Raid Keys, TDM/FFA, duel tournaments with wagers, arenas, kits
Next →
FrontierBorder
Playtime-gated world border that grows on a daily schedule; sets the server timezone
Looking for something specific? Search the whole suite.