JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 205
  • Score
    100M100P100Q76801F
  • License MIT

The Node.js library for interacting with the mcstatus.io API.

Package Exports

  • node-mcstatus
  • node-mcstatus/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (node-mcstatus) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

node-mcstatus

The Node.js library for interacting with the mcstatus.io API.

Getting Started

Firstly, you will need to install the library. Open your terminal/command line in your workspace where your package.json file is located, and run the following command.

npm install node-mcstatus

Usage

Java Status

const mcs = require('node-mcstatus');

// ...

const host = 'play.hypixel.net';
const port = 25565;

// The `port` argument is optional and defaults
// to 25565.
mcs.statusJava(host, port)
    .then((result) => {
        // ...
        // `result` will be the same shape and
        // properties as what is documented on
        // our website.
        // https://mcstatus.io/docs#java-status
    })
    .catch((error) => {
        // Handle the `error` ...
        // Receiving an error does not mean that the
        // server is offline, it means there was an
        // issue with our service or your network.
    })

Bedrock Status

const mcs = require('node-mcstatus');

// ...

const host = 'pe.mineplex.com';
const port = 19132;

// The `port` argument is optional and defaults
// to 19132.
mcs.statusBedrock(host, port)
    .then((result) => {
        // ...
        // `result` will be the same shape and
        // properties as what is documented on
        // our website.
        // https://mcstatus.io/docs#bedrock-status
    })
    .catch((error) => {
        // Handle the `error` ...
        // Receiving an error does not mean that the
        // server is offline, it means there was an
        // issue with our service or your network.
    })

License

MIT License