A Minecraft Bot for the Drunks written in JavaScript with Mineflayer
Requirements:
- NodeJS
- Install all packages:
npm i
- Edit
config/config.json:{ "autoArmor": true, "autoEat": true, "autoTotem": true, "commands": { // Determines from where commands can get executed "chat": false, "commandline": true, "whisper": true }, "console": { "sendChat": true, // Send messages in chat from command line "theme": { "oldTheme": false } }, "friends": [], "logOnTotemPop": true, // Logoff on totem pop "lookAtNearestPlayer": true, "packetLogger": { "enabled": false, "packets": [] // Packets to log }, "pathfinder": { "canDig": true, "canPlace": true }, "retaliate": { // Attack the entity that attacked you "enabled": true, "ignoreFriends": true }, "velocity": true, // Anti Knockback "noFall": true // No fall damage ... And more i dont want to put here :P } - Edit
config/accounts.json:[ { "username": "Your Username", "auth": "Authentication Method (microsoft, offline)", "permissions": [ { "level": 1, "name": "administrator", "players": [ "Players with admin access" ] }, { "level": 2, "name": "moderator", "players": [ "Players with mod access" ] }, { "level": 3, "name": "user", "blacklisted": [ "Players that are blacklisted from every command" ] } ] } ]
- Display all arguments using
node --no-wwarnings src/index.js --help
- Start it with all required arguments:
- Example: I want my bot to join
simpcraft.comasEglijohn_Dev:node src/index.js -h simpcraft.com -u Eglijohn_Dev
- Example 2: I want my bot to join my LAN-World on port
6969asBrewBot:node src/index.js -p 6969 -u BrewBot
- Example: I want my bot to join
- You can see all console commands by typing '!help' in the console
- To see all chat commands, you can message the Bot '!help'
To let the Bot send a message in chat over console, you can just type what you want (without an '!' before, you can disable that in the config: console/sendChat: false) and press enter, or use the !say command.
If you have multiple Bot-Instances, all bots will execute the same command when you enter it in the console. However, you can tell a specific bot to execute a command by using '!:Username command'. Example: '!:Eglijohn_Dev say Hello, World!'
- To use an addon, simply drop the folder into
addons/ - For developers: there is an example addon in
addonCollection/