ServerAPIv1.1.0

ServerAPI

一套 REST API,讓網站、Discord bot 與監控面板讀取 Minecraft 伺服器的即時資料。

A REST API allowing websites, Discord bots and dashboards to read live data from your Minecraft server.

總覽Overview

ServerAPI 讓網站、Discord bot 與監控面板透過 HTTP 讀取 Minecraft 伺服器的即時資料。

每個資料分類都是獨立端點,共用同一個 HTTP 埠。回應一律是 JSON,格式統一。

curl http://localhost:8080/api/v1/status
{
  "ok": true,
  "data": { "online": ["40094f2f-…"], "minecraft": 2, "discord": 3400 },
  "meta": { "version": "v1", "server": "global", "updatedAt": 1784300000000 }
}

所有玩家欄位一律使用 UUID,不使用名稱。

16 個端點一覽,並標示各自是否需要金鑰
需求:Paper 26.1、Java 21 以上。僅支援 Paper,因為使用了 Paper 專屬的指令 API, Spigot 與 Bukkit 無法載入。

ServerAPI lets websites, Discord bots and dashboards read live Minecraft server data over HTTP.

Every category is its own endpoint, all sharing one HTTP port. Responses are always JSON in a consistent shape.

curl http://localhost:8080/api/v1/status
{
  "ok": true,
  "data": { "online": ["40094f2f-…"], "minecraft": 2, "discord": 3400 },
  "meta": { "version": "v1", "server": "global", "updatedAt": 1784300000000 }
}

Every player field is a UUID, never a name.

All 16 endpoints and which ones need a key
Requires Paper 26.1 and Java 21 or newer. Paper only, since it uses Paper's own command API. Spigot and Bukkit cannot load it.