JSPM

  • Created
  • Published
  • Downloads 13183
  • Score
    100M100P100Q126056F
  • License MIT

create minecraft bots with a stable, high level API

Package Exports

  • mineflayer

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mineflayer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Mineflayer

Create Minecraft bots with a powerful, stable, and high level JavaScript API.

Current Project Status

Supports Minecraft 1.4.6.

Usage

Echo Example

var mineflayer = require('mineflayer');
var bot = mineflayer.createBot({
  host: "localhost", // optional
  port: 25565,       // optional
  username: "player",
  email: "email@example.com", // email and password are required only for
  password: "12345678",       // online-mode=true servers
});
bot.on('chat', function(username, message) {
  bot.chat(message);
});

Installation

npm install mineflayer

Documentation

  • See doc/api.md.
  • See examples/.

Testing

npm test

Updating to a newer protocol version

  1. Wait for a new version of mineflayer-protocol to be released which supports the new Minecraft version.
  2. npm install --save minecraft-protocol
  3. Apply the protocol changes where necessary.
  4. Run the test suite. See Testing above.