4.1.2 • Published 12 months ago

queryserver v4.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

queryserver

This package is a tool for the Minecraft server protocol that allows the user to query the status of a Minecraft server (be it Java Edition, Bedrock Edition, MCPE, and more) using wide berth of protocols and data-merging techniques.

This package is the successor to QueryServer.js v3 library used by the Minecraft Server Status Discord bot.

Todo items:

  • Support for nonstandard implementations (GeyserMC, etc.)
  • Legacy (beta/alpha) server support
  • Fix dangling promises/event loop hogging
  • Performance improvements

NOTE: This project is still WIP

Function signature:

interface QueryServerResults {
  hostname?: string;
  ip: string;

  type: "Java" | "Bedrock" | "Unknown" | "Crossplay";

  motd?: string;
  version?: string;
  players: {
      online?: number;
      max?: number;
      list?: string[];
  };
  favicon?: string;
  latency: number;

  debug: {
    options: Options;
    srvs?: string[];

    protocol?: number;
    protocolVersion?: string;

    java: boolean;
    bedrock: boolean;
    query: boolean;
  };
}

declare function queryserver(host: string, options: Options): Promise<QueryServerResults>;

Install instructions:

  1. Run npm install --save queryserver
  2. Use as follows:
   import queryserver from "queryserver";
   // or...
   const queryserver = require("queryserver").default;

   queryserver("mc.hypixel.net:25565")
     .then(console.dir)
     .catch(console.error);
4.1.2

12 months ago

4.1.1

12 months ago

4.1.0

12 months ago

4.0.1

12 months ago

4.0.0

12 months ago