prismarine-tokens-fixed
Store and use authentication tokens instead of passwords to emulate the way the official launcher works This is simply a fork of prismarine-tokens with a minor patch applied to get it working. All credit goes to pqml. You can find the original project here -> https://github.com/pqml/prismarine-tokens
Features
- Store all authentications tokens to automatically reuse them on future connections
- Minimal username+password authentications to prevent Mojang from blocking your account
- Support of both mineflayer and minecraft-protocol
- Multiple storage files
- Asynchronous calls
- Easy implementation on your project: just wrap all your bot in a callback function
Installation
npm install prismarine-tokens-fixed
Usage
Example with mineflayer
var mineflayer = ;var tokens = ; var options = host: 'localhost' // optional port: 25565 // optional username: 'email@example.com' password: '12345678' //Location of the file to store and read tokens for this bot //You can use the same file for all your bots tokensLocation: './bot_tokens.json' //Set to true if you want debug informations tokensDebug: true; tokens;
Example with minecraft-protocol
var mc = ;var tokens = ; var options = host: 'localhost' // optional port: 25565 // optional username: 'email@example.com' password: '12345678' //Location of the file to store and read tokens for this bot //You can use the same file for all your bots tokensLocation: './bot_tokens.json' //Set to true if you want debug informations tokensDebug: true; tokens;