Skip to content

stanstrum/queryServer3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

queryServer3

Minecraft Server Status's QueryServer.js library v3

NOTE: This project is still WIP

Function signature:

interface QueryResult {
  motd: string,
  version: string,
  latency: number,
  players: {
    online: number,
    max: number,
    list: Array<{
      uuid: string,
      name: string
    }>
  },
  favicon?: string,
  ip: string,
  type: string,
}

declare function queryServer(sockAddr: string): Promise<QueryResult>;
// or ...
declare function queryServer(host: string, port: number): Promise<QueryResult>;

Install instructions:

  1. Clone the repository
git clone https://github.com/stanstrum/queryServer3.git/
  1. Run npm install
  2. Run npm run build
  3. Copy the generated queryServer.js file from the dist/ directory into your dependencies folder
  4. Use as follows:
const queryServer = require("./path/to/queryServer.js");
    
queryServer("mc.hypixel.net:25565")
  .then(console.dir)
  .catch(console.error);

About

Minecraft Server Status's QueryServer.js library v3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published