PrismarineJS / mineflayer

Create Minecraft bots with a powerful, stable, and high level JavaScript API.
https://prismarinejs.github.io/mineflayer/
MIT License
4.95k stars 904 forks source link

i have a question, when i install a plugin #888

Closed MaxProg2 closed 4 years ago

MaxProg2 commented 4 years ago

do i have to install a plugin? and if i do have to, how do i do? do i just open terminal and write "npm mineflayer-navigate" and it installs? or do i have to open the mineflayer folder and install it there?

or either its already has the plugins?

wvffle commented 4 years ago

Open terminal and run:

npm install mineflayer-navigate

And then add it in the code:

// require mineflayer and other stuff
const navigatePlugin = require('mineflayer-navigate')(mineflayer);

// create your bot
const bot = mineflayer.createBot(...)

navigatePlugin(bot);

And you are ready to go :)