update readme

This commit is contained in:
Timofey Gelazoniya 2022-08-23 16:22:42 +03:00
parent e927748935
commit 72041aa3f9
Signed by: zeldon
GPG Key ID: 047886915281DD2A
1 changed files with 7 additions and 4 deletions

View File

@ -1,11 +1,11 @@
# mineping
Collect information about Minecraft (both Java and Bedrock) using **[Node.js](http://nodejs.org)**.
## Description
`mineping` is a Javasript library thar provides Minecraft server ping protocol implementation. It can be used to collect information about the server, such as MODT, current online, server icon (java edition only) and etc.
Mirror on my [<img src="https://git.zeldon.ru/assets/img/logo.svg" align="center" width="20" height="20"/> Git](https://git.zeldon.ru/zeldon/mineping)
## Requirements
> **[Node.js](https://nodejs.org/) 14 or newer is required**
## Install
@ -23,6 +23,7 @@ import { pingJava, pingBedrock } from '@minescope/mineping';
```
### CommonJS
`mineping` is an ESM-only module — you are not able to import it with `require()`.
If you cannot switch to ESM, you can use the async `import()` function from CommonJS to load `mineping` asynchronously:
@ -53,8 +54,10 @@ const data = await pingBedrock('mco.mineplex.com', {
});
console.log(data);
```
> More complex example can be found in the `example` folder!
## Acknowledgements
- [mcping](https://github.com/Scetch/mcping) crate for Rust
- [mcping-js](https://github.com/Cryptkeeper/mcping-js) library for quering Minecraft Java Edition servers
- [mcping-js](https://github.com/Cryptkeeper/mcping-js) library for quering Minecraft Java Edition servers