Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

minecraft-server-data

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minecraft-server-data

A simple MCApi wrapper written in JavaScript.

  • 1.1.2
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Minecraft Server Data

Get the status data of a Minecraft server by providing it's IP address.

Installation

NPM

npm install minecraft-server-data

Usage

The only and mandatory parameter for this function to be executed is a server IP.
You can provide a port as well if needed. The default one is 25565.

Here is a quick example of how to make a call

const getData = require("minecraft-server-data");

// Not providing a port
getData("<YourServerIP>")
  .then(console.log)
  .catch(console.error);

// Providing a port
getData("<YourServerIP>", 43778)
  .then(console.log)
  .catch(console.error);

Data Structure

The output data will look like the following:

{
    "online": true,
    "motd": "<TheServersMOTD>",
    "players": {
        "max": 5,
        "now": 0
    },
    "server": {
        "version": "<TheServersMinecraftVersion>",
        "protocol": 340
    },
    "last_online": "LastSeenOnlineTimestamp",
    "last_updated": "LastUpdatedTimestamp",
    "queryDuration": 435
}

The queryDuration is output in millisecond.

© 2020 - Edouard Courty

Keywords

FAQs

Package last updated on 23 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc