ServerAPI 图标

ServerAPI

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.0
本资源为搬运资源,原资源地址: https://modrinth.com/mod/serverapi
资源信息

Minecraft 版本: 1.21 1.21.1 1.21.2 1.21.3 1.21.4 1.21.5 1.21.6 1.21.7 1.21.8 1.21.9 1.21.10 1.21.11

平台: bukkit paper purpur spigot

标签: management

资源介绍

logo

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.

preview

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

  1. 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:

use-case

下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
YDM's Glare

价格:0 墨喵币
下载量:0

查看详情
Hit Timer

价格:0 墨喵币
下载量:0

查看详情
Starbond

价格:0 墨喵币
下载量:0

查看详情
Cobblemon Pogwarts

价格:0 墨喵币
下载量:0

查看详情