Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A robust Minecraft AFK bot built with Mineflayer that supports AuthMe authentication and automatic server switching to survival mode, featuring anti-AFK measures, auto-reconnection, and customizable movement controls.

License

Notifications You must be signed in to change notification settings

albertodrake/Minecraft-afk-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

10 Commits

Repository files navigation

🧠 Minecraft AFK Bot with AuthMe and Server Selector

GitHub stars GitHub forks GitHub watchers License Last Commit Code Size


πŸš€ Overview

This is a sophisticated Minecraft AFK bot built with Mineflayer, featuring:

  • βœ… Full AuthMe plugin compatibility for secure authentication
  • πŸ” Automatic server switching with custom commands (e.g., /server survival)
  • πŸ’€ Smart anti-AFK mechanisms to stay active
  • βš™οΈ Robust auto-reconnect and error handling
  • 🧩 Easy configuration for any Minecraft server version
  • 🌍 Designed for networks using AuthMe + BungeeCord/Multiplex

✨ Features

Feature Description
πŸ” AuthMe Authentication Auto register/login via chat detection and retry logic
🌐 Server Selector Automatically join servers using commands like /server survival
πŸ’€ Anti-AFK System Periodic jumps, sneaks, and random looks to avoid kick
🧭 Movement & Pathfinding Moves to configured AFK coordinates using Mineflayer pathfinder
πŸ” Auto Reconnect Reconnects automatically after disconnection or kick
πŸ’¬ Chat Logging Logs chat messages and can send periodic updates
🧩 Cross-Platform Support Works on Windows, Linux, Docker, and Pterodactyl panels

βš™οΈ Installation

git clone https://github.com/albertodrake/minecraft-afk-bot.git
cd minecraft-afk-bot
npm install

🧾 Configuration

Edit the bot-authme-first.js file with your own settings:

{
 "server": {
 "host": "your.minecraft.server.ip",
 "port": 25565,
 "version": "1.20.4"
 },
 "bot": {
 "username": "YourBotName",
 "auth": "offline",
 "authmePassword": "YourAuthMePassword"
 },
 "serverCommands": {
 "enabled": true,
 "joinServer": "/server survival",
 "delay": 3000
 },
 "features": {
 "movement": {
 "enabled": true,
 "coordinates": {
 "x": 100,
 "y": 65,
 "z": 100
 }
 },
 "antiAFK": {
 "enabled": true,
 "jump": true,
 "sneak": false,
 "look": true,
 "interval": 30000
 },
 "chatMessages": {
 "enabled": false,
 "interval": 300000,
 "messages": ["Still here!", "AFK farming...", "Bot is active"]
 }
 }
}

▢️ Running the Bot

node bot-authme-first.js

⚑ Advanced Usage

🧭 Customize pathfinding coordinates for your AFK spot

πŸ’¬ Enable periodic chat messages for server presence

⏱️ Modify timing delays for joining servers or retrying AuthMe login

🧩 Extend functionality with custom Mineflayer plugins

🧰 Requirements

Node.js v18+

Minecraft Java Edition 1.18+

AuthMe plugin on the target server

(Optional) BungeeCord or Multiplex network setup

πŸ§‘β€πŸ’» Contributing

Contributions are welcome! Submit issues and pull requests to improve features or fix bugs. Please follow best practices and ensure backward compatibility.

βš–οΈ License

This project is licensed under the MIT License. See the LICENSE file for details.

πŸ’Ž Acknowledgments Mineflayer Project

AuthMe Reloaded Plugin

Prismarine.js Ecosystem

πŸ“ž Contact

Created and maintained by: πŸ‘€ Alberto Drake πŸ’¬ For inquiries or collaborations, reach out via GitHub Issues or Discussions.

⭐ If you like this project, don’t forget to give it a star! Your support motivates future updates and improvements. 🌟

About

A robust Minecraft AFK bot built with Mineflayer that supports AuthMe authentication and automatic server switching to survival mode, featuring anti-AFK measures, auto-reconnection, and customizable movement controls.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /