Skip to content

mineflayer-swarm 1.3.0

Install from the command line:
Learn more about npm packages
$ npm install @Pandapip1/mineflayer-swarm@1.3.0
Install via package.json:
"@Pandapip1/mineflayer-swarm": "1.3.0"

About this version

mineflayer-swarm

NPM version Build Status Try it on gitpod

Allows you to control an entire mineflayer bot swarm with minimal additional code. The API isn't final, so minor versions might introduce breaking changes. Here be dragons!

Moving from a single bot to a swarm

It's easier than you'd think!

Example bot using mineflayer:

import { createBot, Bot } from 'mineflayer'

const bot: Bot = createBot({
  username: '[email protected]',
  password: 'P@ssword0!',
  host: 'localhost',
  port: 25565
})

bot.on('chat', function (username, message) {
  if (username === bot.username) return
  bot.chat(message)
})

Example bot using mineflayer-swarm:

import { createSwarm, Swarm } from 'mineflayer'

const swarm: Swarm = mineflayerSwarm.createSwarm({
  host: 'localhost',
  port: 25565
}, require('auth.json'))

swarm.on('chat', function (bot, username, message) {
  if (swarm.isSwarmMember(username)) return
  bot.chat(message)
})

Details


Assets

  • mineflayer-swarm-1.3.0.tgz

Download activity

  • Total downloads 0
  • Last 30 days 0
  • Last week 0
  • Today 0

Recent versions

View all