Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mojang

Package Overview
Dependencies
Maintainers
4
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mojang

Unofficial Node.js library for Mojang's HTTP APIs

  • 2.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
81
increased by47.27%
Maintainers
4
Weekly downloads
 
Created
Source

mojang Build Status Coverage

Unofficial Node.js library for Mojang's HTTP APIs

Create sessions, get user info, change skins, and more with promises.

Includes the functions described on the Minecraft modern wiki, as well as several equally-important but undocumented endpoints. Every function makes a single HTTP request.

Please use GitHub Issues to submit a bug, request new examples, or report a missing feature. Pull requests welcome.

Install

$ npm install mojang

Usage

Read the API documentation or look in test/ and test-online/ folders.

const mojang = require('mojang')

mojang.authenticate({username, password})
  .then(session => mojang.getUser(session))
  .then(user => console.info(user))
  .catch(err => console.error(err))
  • mojang-api - small library for some Mojang username and profile endpoints
  • yggdrasil - PrismarineJS's Mojang authentication with server joining

Integration Tests

Set up an .envrc file and direnv or similar to provide secrets to these tests first.

$ npx ava test-online/security.js
$ npx ava test-online/yggdrasil.js
$ npx ava test-online/security.js

Coverage

Available through codecov.io, or locally.

$ npx nyc npm test

License

MIT © Jamen Marzonie

Ownership transferred from jamen/node-mojang.

This repository is not affiliated with Mojang.

"Minecraft" is a trademark of Mojang Synergies AB.

Keywords

FAQs

Package last updated on 12 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc