mcpinger

0.1.8 • Public • Published

MCPinger

Installation

$ npm install mcpinger

Example

let mcpinger = require("mcpinger");

/**
 * Options:
 * - host: The ip of the server.
 * - port?: Port of the server. (Default 25565)
 * - timeout?: (Default 5000)
 * - protocolVersion?: (Default -1) https://wiki.vg/Protocol_version_numbers
 * 
 * */
mcpinger.java({ host: "example.com" }).then((res) => {
  console.log(res);
  /**
   * Example output:
   * 
   * {
   *   protocolVersion: 754,
   *   version: 'Paper 1.16.5',
   *   onlinePlayerCount: 1,
   *   maxPlayerCount: 25,
   *   playerList: [
   *     {
   *       uuid: 'example-uuid',
   *       name: 'example-name'
   *     }
   *   ],
   *   favicon: Buffer,
   *   motd: 'Example.',
   * }
   * 
   * */
});

Package Sidebar

Install

npm i mcpinger

Weekly Downloads

20

Version

0.1.8

License

Apache-2.0

Unpacked Size

39.1 kB

Total Files

7

Last publish

Collaborators

  • armagan_