Compatibility
Minecraft: Java Edition
Platforms
Links
Tags
Creators
Details

ServerAPI is a high-performance REST API plugin that exposes real-time Minecraft server metrics, player statistics, and third-party plugin data through a secure, token-protected interface.

It works by running an asynchronous HTTP server on a separate thread, using reflection to safely retrieve deep server information without impacting game performance or TPS.
Usage Guide
1.Installation & Build Place ServerAPI-1.0.jar into your plugins/folder. Start the server to generate the config.yml
- API Endpoints & Data Info
Status (GET /status) Provides a general overview of the server:
- online: Server accessibility status.
- version: Server software version.
- paper_version: Specific implementation version.
- players: Sub-object containing online and max counts.
- tps: Current Ticks Per Second (1-minute average).
- mspt: Milliseconds Per Tick (Average).
- uptime: Total server uptime in seconds.
- worlds: List of loaded world names.
Performance (GET /performance) Detailed resource and health metrics:
- tps: Precise 1m, 5m, and 15m averages.
- mspt: Average tick time (highly accurate).
- lag_warning: Boolean that flags true if TPS drops below 18.0.
Player Info (GET /player/{name}) Comprehensive data for online and offline players:
- name, uuid, online status.
- lastSeen: Human-readable time (e.g., "2 hours ago").
- playtime: Formatted total time in hours.
- kills / deaths: Secure stats (safely returns 0 if data isn't loaded/tracked yet).
- money: Formatted balance using Vault.
- alts: IP-matched alt accounts from EssentialsX.
- crates: List of specific crate types and how many virtual keys the player owns.
Miscellaneous Endpoints
- /misc/balancetop: Top 10 richest players (cached based on config).
- /misc/statistics: Global Top 10 for kills/deaths (cached).
- /misc/warps: All available EssentialsX warps.
- /misc/crates: All registered ExcellentCrates IDs.
- /misc/projectkorra: All bending abilities grouped by element.
Configuration (config.yml)
- Security: All requests require Authorization: Bearer YOUR_TOKEN.
- Toggles: Every endpoint and sub-endpoint listed above can be individually disabled.
- Caching: Heavy lookups like BalTop and Global Stats have configurable cache durations (default 5 mins) to protect your server's TPS.
- Asynchronous: The API runs on a separate thread pool to ensure zero impact on your Minecraft server performance.
An image that gives an example of a use-case of the plugin:



