gamestate
v0.3.9
Published
Universal game server status and player query tool
Downloads
792
Maintainers
Readme
🎮 gamestate — Universal Game Server Status Query Tool
gamestate is a modern game server querying CLI & API for:
- Minecraft Java Edition
- Minecraft Bedrock Edition
- Counter-Strike 2 (Valve)
- Multi Theft Auto: San Andreas (MTA:SA)
Works everywhere — even if UDP ports are blocked ✔
Reliable fallbacks for CS2 and MTA:SA ✔
Clean and compact server info ✔
📦 Install
Global CLI:
npm install -g gamestatenpm install gamestate🖥️ CLI Usage
gamestate <game_type> <ip[:port]>Examples:
gamestate minecraft mc.hypixel.net
gamestate bedrock play.nethergames.org
gamestate cs2 51.210.246.171:27015
gamestate mta 91.200.42.46:22003🧩 Node.js API Usage
import { query } from "gamestate";
const status = await query({
type: "minecraft",
host: "mc.hypixel.net"
});
console.log(status);📊 Returned Data Fields by Game Type
| Field | Minecraft Java | Minecraft Bedrock | CS2 | MTA:SA | Notes |
|------|:---:|:---:|:---:|:---:|------|
| name | ✔ | ✔ | ✔ | ✔ | Server name |
| numplayers | ✔ | ✔ | ✔ | ✔ | Active players |
| maxplayers | ✔ | ✔ | ⚠ sometimes | ✔ | Steam API fallback → unknown |
| version | ✔ | ✔ | ✔ | ✔ | Game version |
| map | ❌ | ❌ | ✔ | ✔ | Not supported in Minecraft status |
| ping | ✔ | ✔ | ✔* | ❌ | *API fallback → "UDP blocked" |
| gamemode | ❌ | ❌ | ❌ | ✔ | MTA:SA only |
| players[] list | 🔜 | 🔜 | ❌ | 🔜 | Future: --players |
| protocol | ✔ | ✔ | ✔ | ✔ | Source of query |
| raw | ✔ | ✔ | ✔ | ✔ | Full response data |
