@xmcl/server-info

2.0.4 • Public • Published

Server Info Module

npm version Downloads Install size npm Build Status

Provide function to parse server info (servers.dat)

Usage

Read and Write Server Info

import { readInfo, writeInfo, ServerInfo } from "@xmcl/server-info";

const seversDatBuffer: Buffer; // this is the servers.dat under .minecraft folder
const infos: ServerInfo[] = await readInfo(seversDatBuffer);
const info: ServerInfo = infos[0];

// info.ip -> server ip
// info.name -> server name

Package Sidebar

Install

npm i @xmcl/server-info

Weekly Downloads

2

Version

2.0.4

License

MIT

Unpacked Size

45.8 kB

Total Files

11

Last publish

Collaborators

  • ci010