Description
Join my Discord if you run into issues or have ideas https://discord.gg/mKgxyk6qvb
Every stats, achievement and map plugin hooks the same engine events for itself. Install four of them and the server tracks every block break four times, and the four still disagree on the count. TrackerAPI tracks it once and the others read from it. On its own it shows players nothing. Install it next to a plugin that uses it, or build on it.
What it records
62 kinds of event. Blocks broken, placed, used and damaged, with whether the player placed that block themself. Items crafted, picked up, eaten, dropped and lost, and which chest they came from. Every hit and death with who took part, including everyone who hit a boss before it died. Joins, world changes, teleports, chat, zones, mounts, weather, moon phases, the clock and chunks. A position sample every second with metres walked, swum, glided and ridden.
On top of that it keeps lifetime counters for every player who ever joined, per block, item and creature, per world, with leaderboards rebuilt every minute. The journal keeps 14 days of events on disk in hourly files per world, so /trackerapi lookup here --radius 8 --hours 12 tells you who broke the blocks around you last night.
On first boot it seeds its counters from the Feats and Chronicle Stats files already on the server, so nobody starts from zero.
With my other mods
All optional, and each of them runs without TrackerAPI. Each has a setting with auto, always or never, auto by default.
| Mod | What it does with TrackerAPI |
|---|---|
| Feats 1.5.0+ | Drops its own hooks and takes 34 kinds of event for its feats |
| Chronicle Stats 1.2.0+ | Every stat and record on the dashboard, plus Dominion's counters per faction |
| Atlas 1.6.0+ | The activity heat layer and kill feed |
| Coinage 1.0.0+ | Kill and block rewards, and writes money earned and spent back as counters with leaderboards |
| Dominion Factions 0.5.1+ | Gather missions, and writes 25 faction counters, 23 with leaderboards |
| SocialBridge 0.2.0+ | Join, leave, death and boss kill posts in Discord, /profile stats and /top |
| RestAPI 0.2.0+ | Counters, leaderboards, recent events and journal lookups under /api/tracker |
Lullaby has no link to it. TrackerAPI counts sleeps on its own.
Coinage, Dominion Factions, SocialBridge and RestAPI are not on CurseForge yet, so those four links go live with their first upload. After /plugin reload Ryvrook:TrackerAPI all seven come back by themselves, each once.
Cost
A hook nobody wants costs one volatile read. Listeners run on TrackerAPI's own thread with a 50 ms budget per batch, so a slow plugin gets warned and suspended and never slows the tick. With all seven of my mods subscribed a block event costs 72 to 75 ns on that thread. /trackerapi perf shows what each hook costs on your server.
Commands
All need trackerapi.admin. /trackerapi status shows which mods use it at which version, their subscriptions, the queue and the journal size. perf, recent kind, lookup, counters player, top key, import and reload do what they say. Settings live in mods/Ryvrook_TrackerAPI/TrackerAPI.json and the README lists every key.
For plugin authors
List Ryvrook:TrackerAPI as an optional dependency, keep its imports in one class you load after TrackerApi.isPresent(), and subscribe from TrackerApi.onEnable. Records only ever gain fields. Your plugin can write its own counters under its own prefix and get a leaderboard for them. The README on GitHub has the example.
Limits
Needs server 0.7.0 or newer and Java 25. It runs on my own server beside Feats, Chronicle Stats and Atlas, but I have not measured it with a big player count. Tell me on Discord if a count looks wrong.
PREFAB_PASTED exists in the API and is never sent, because hooking it crashes the world on 0.7.
Links
- More mods by ryvrook https://www.curseforge.com/members/ryvrook/projects
- Feats, Chronicle Stats, Atlas, Lullaby
- Coinage, Dominion Factions, SocialBridge and RestAPI
- Source https://github.com/ryvrook/trackerapi
- Discord https://discord.gg/mKgxyk6qvb


