mirror of
https://github.com/minescope/mineping.git
synced 2024-12-25 19:05:46 +00:00
Ping both Minecraft Bedrock and Java servers.
example | ||
lib | ||
types | ||
.gitignore | ||
index.js | ||
LICENSE | ||
package.json | ||
README.md | ||
SECURITY.md | ||
yarn.lock |
mineping
Collect information about Minecraft (both Java and Bedrock) using Node.js.
Description
mineping
is a Javasript library thar provides Minecraft server ping protocol implementation. It can be used to collect information about the server, such as MODT, current online, server icon (java edition only) and etc.
Requirements
Node.js 14 or newer is required
Example
Ping a Java server with default options:
import { pingJava } from 'mineping'
const data = await pingJava('mc.hypixel.net');
console.log(data);
Ping a Bedrock server with custom options:
import { pingBedrock } from 'mineping'
const data = await pingBedrock('mco.mineplex.com', {
port: 19132,
timeout: 500
})
More complex example can be found in the
examples
folder!