Welcome to the Mineflayer Bot API! This API allows you to create mineflayer bots with different authentication methods and configurations. Let's get started!
Before running the API, make sure you have Node.js installed on your system. Then, follow these steps:
- Clone the repository:
$ git clone https://github.com/your/repo.git
- Install dependencies:
$ npm install
- Configure the necessary environment variables or update the code with your desired configurations.
- Start the API:
$ npm start
To add a mineflayer bot, make a GET request to /addbot
. The following headers are required:
ip
: The server IP addressusername
: Bot's desired usernamepassword
: Bot's password (Premium authentication only)port
: The server port (Premium authentication only)version
: Minecraft versionauth
: Authentication method ('premium' or 'cracked')
Example Request:
GET /addbot
Host: localhost:3000
ip: example.com
username: bot123
password: secret
port: 25565
version: 1.17.1
auth: premium
The API will respond with a success message if the bot was created successfully. If any errors occur during bot creation or event handling, appropriate error messages will be logged to the console.
The API includes error handling to catch exceptions and provide meaningful error responses. If an error occurs during bot creation or if an invalid authentication method is provided, an error