#
Home

A modern, small, performant, zero dependency TypeScript library made for fast pinging and getting status of Minecraft servers
#
What can this library do?
- Getting server Latency (ping)
- Getting server MOTD
- Downloading server Thumbnail (favicon)
- Viewing Server Version
- Fetching Player Count and Playerlist
- Look up SRV records
#
Getting started!
#
Requirements
- NodeJS or Deno (used to run JavaScript code)
- NPM (used to install Node packages)
#
Installation
npm install minecraftstatuspinger
#
Example
import mc from "minecraftstatuspinger";
let result = await mc.lookup({ host: "mc.hypixel.net" });
console.log(result);
See what might be in the result
Advanced example!
import mc from "minecraftstatuspinger";
//OR
const mc = require("minecraftstatuspinger");
let result = await mc.lookup({
host: "mc.hypixel.net", // A hostname, or an IP of your server.
port: 25565, // Port of the server.
ping: true, // Whether to get the latency of the server, or skip that part.
protocolVersion: 769, // Minecraft version - 769 is 1.21.4
timeout: 10000, // Time in milliseconds to wait for a response before throwing an error.
throwOnParseError: true, // Whether to throw an error if parsing of the status response fails.
SRVLookup: true, // Whether to do a SRV lookup before doing a normal lookup.
JSONParse: true // Whether to skip parsing the JSON response entirely.
});
console.log(result);