minecraft-lib
v1.1.6
Published
Minecraft API for JavaScript
Downloads
19
Readme
minecraft-lib
A pure-JS, promise-based, easy to use library for Minecraft and Mojang API in JavaScript
License | Documentation | Github | Author | Site
Some things you can do with this library :
- Get player's info
- Ping a server
- Get Minecraft services status
- Manipulate your skin
Installation
In your npm project, simply type :
$ npm install minecraft-lib --save
Basic usage
const MCAPI = require("minecraft-lib")
MCAPI.players.get("Notch")
.then(player => {
console.log("Username : " + player.username)
console.log("UUID : " + player.uuid)
console.log("Skin URL : " + player.textures.skin_url)
})
.catch(console.error)
Docs and examples
The library's methods and attributes are all referenced in the online documentation
Some examples are available here
Dependencies
Minecraft-js loves and uses :
minecraft-data
: A module from PrismarineJS which provides data about Minecraft in JavaScriptrequest
: Best module ever for HTTP requests!js-base64
: A base64 transcoder for JavaScript
Related packages
mc-ping-updated
: Module for pinging serversmojang-api
: A small wrapper around some Mojang API's featuresmojang
: A library covering the Mojang API
Contributing
Feel free to contribute to the project!
Some attributes are not documented, especially some from MojangAccountProperties
because no information have been found. Contributing to the docs would be greatly appreciated!
Please follow the guidelines when contributing!
To do
The following features are not implemented yet:
LoggedPlayerTextures.upload_skin()
- Mojang token manipulation
License
This project is licensed under the MIT License.
Minecraft-js is not affiliated by anyway with Mojang AB. This library is in fact unofficial.