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
In your npm project, simply type :
$ npm install minecraft-lib --save
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)
The library's methods and attributes are all referenced in the online documentation
Some examples are available here
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
mc-ping-updated
: Module for pinging serversmojang-api
: A small wrapper around some Mojang API's featuresmojang
: A library covering the Mojang API
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!
The following features are not implemented yet:
LoggedPlayerTextures.upload_skin()
- Mojang token manipulation
This project is licensed under the MIT License.
Minecraft-js is not affiliated by anyway with Mojang AB. This library is in fact unofficial.