PrismarineJS / mineflayer

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

fix gamemode incorrect reset #3386

Open yanyancode opened 4 months ago

yanyancode commented 4 months ago

When the packet's gamemode is undefined, the bot's gamemode resets to survival (when gamemode in server is unchanged at respawn).

extremeheat commented 4 months ago

/fixlint

rom1504bot commented 4 months ago

I ran npm run fix, but there are still some linting errors left that must be manually resolved:

> mineflayer@4.20.1 fix
> standard --fix && standard-markdown --fix

  /home/runner/work/mineflayer/mineflayer/lib/plugins/game.js:27:25: Expected '!==' and instead saw '!='. (eqeqeq)
standard: Use JavaScript Standard Style (https://standardjs.com)