/*1* This is one of the simplest examples.2*3* We created a simple bot that connects to a server and immediately quits.4*5* It's not very useful yet, but you can use this as a starting point6* to create your own bot.7*/8const mineflayer = require('mineflayer')910if (process.argv.length < 4 || process.argv.length > 6) {11console.log('Usage : node quitter.js <host> <port> [<name>] [<password>]')12process.exit(1)13}1415const bot = mineflayer.createBot({16host: process.argv[2],17port: parseInt(process.argv[3]),18username: process.argv[4] ? process.argv[4] : 'emobot',19password: process.argv[5]20})2122bot.once('spawn', () => {23bot.chat('Goodbye, cruel world!')24bot.quit()25})262728