mineflayer-swarm 1.2.1
Install from the command line:
Learn more about npm packages
$ npm install @Pandapip1/mineflayer-swarm@1.2.1
Install via package.json:
"@Pandapip1/mineflayer-swarm": "1.2.1"
About this version
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!
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', (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(require('auth.json'), {
host: 'localhost',
port: 25565
})
swarm.on('chat', (bot, username, message) => {
if (swarm.isSwarmMember(username)) return
bot.chat(message)
})