minecraft-status
Node.js module for gathering information about Minecraft Java Edition servers and Minecraft Bedrock Edition servers.
minecraft-status was based off of mc-ping-updated, mc-stat, and mcpe-ping.
minecraft-status supports the Server List Ping protocol for Minecraft Java Edition servers on Minecraft versions 1.7 and above (current), 1.6, and 1.4 through 1.5, and Beta 1.8 through 1.3 and the Query protocol for Minecraft Java Edition servers on Minecraft versions 1.9pre4 and above.
Support for Minecraft Bedrock Edition servers should be implemented soon™️.
Documentation
Include minecraft-status in your project like so.
// MinecraftServerListPing (either)const MinecraftServerListPing = ;const MinecraftServerListPing = MinecraftServerListPing; // MinecraftQuery (either)const MinecraftQuery = ;const MinecraftQuery = MinecraftQuery; // Bothconst MinecraftServerListPing MinecraftQuery = ;
For more information on the Server List Ping or Query protocols, consult wiki.vg.
Unlike previous versions of minecraft-status, functions use promises rather than callback functions.
MinecraftServerListPing;
Server List Ping
1.7 and above (current)
MinecraftServerListPing
protocol
Default 4. See protocol version numbers. The version the client uses to connect to the server.
host
The host, or the domain name, IPv4, or IPv6 address, of the server.
port
Default 25565. The port of the server.
callback(error, response)
timeout
Default 3000. Milliseconds.
1.6
MinecraftServerListPing
protocol
Default 73. See protocol version numbers. The version the client uses to connect to the server.
host
The host, or the domain name, IPv4, or IPv6 address, of the server.
port
Default 25565. The port of the server.
callback(error, response)
timeout
Default 3000. Milliseconds.
1.4 through 1.5
MinecraftServerListPing
host
The host, or the domain name, IPv4, or IPv6 address, of the server.
port
Default 25565. The port of the server.
callback(error, response)
timeout
Default 3000. Milliseconds.
Beta 1.8 through 1.3
MinecraftServerListPing
host
The host, or the domain name, IPv4, or IPv6 address, of the server.
port
Default 25565. The port of the server.
callback(error, response)
timeout
Default 3000. Milliseconds.
Query
The following must be configured in the server.properties
file.
enable-query=true
query.port=<1-65535>
The default query port matches the port established in server-port
.
Basic stat
MinecraftQuery
host
The host, or the domain name, IPv4, or IPv6 address, of the server.
port
Default 25565. The port of the server.
callback(error, response)
timeout
Default 3000. Milliseconds.
Full stat
MinecraftQuery
host
The host, or the domain name, IPv4, or IPv6 address, of the server.
port
Default 25565. The port of the server.
callback(error, response)
timeout
Default 3000. Milliseconds.