Getting Started
Get the plugin on your server, set an API key, and make your first API call, about five minutes end to end.
Requirements
- A Paper, Spigot, or Purpur server running Minecraft 1.16 or newer (built against Paper 1.16.5).
- Java 16 or newer on the server host.
- A free TCP port reachable from wherever your clients run (default
8080).
Install
Download the latest statfyr-1.0.0-BETA.jar from Modrinth and drop it into your server's plugins/ folder, then restart the server. On first boot statfyr writes its default plugins/statfyr/config.yml and starts listening immediately.
Secure the API
The API is open by default (anyone who can reach the port can read stats). Before exposing it beyond localhost, set a Bearer key in plugins/statfyr/config.yml:
plugins/statfyr/config.ymlyaml
security:
enable-api-key: true
api-key: "pick-a-long-random-string"Verify
From the server host, confirm the API answers:
curl http://localhost:8080/api/health \
-H "Authorization: Bearer pick-a-long-random-string"A JSON object with system.status set to "ok" means statfyr is up. Then try your first player lookup: substitute a real player name:
curl http://localhost:8080/api/player/Notch/summary \
-H "Authorization: Bearer pick-a-long-random-string"The response shape is documented route by route on the API reference page.
What's next
- Tune ports, HTTPS, caching, and rate limits in the configuration reference.
- Browse every route with real payloads in the API reference.
- Copy a dashboard, leaderboard, or Discord bot recipe from examples.