Have you ever wondered what really goes on in the infamous and chaotic world of 2b2t, Minecraft's oldest anarchy server? Ever wished you could get rare insights into the players, places, events, and rich history that have defined this boundary-pushing community over the past decade? Our new 2b2t API gives you access to data and tools to satisfy your curiosity and enhance your experience with this one-of-a-kind server.
Important
2b2t tools makes use of 2 bots and to run you will also require 2 paid Minecraft accounts.
Using Docker at the moment is not recommended as it may be slower updated than the python version below.
If you have Docker installed, you can easily get 2b2t tools up and running. Follow the steps below:
- Open your terminal.
- Pull the Docker image from the Docker Hub using the following command:
docker pull SOON!
After pulling the image, run the Docker container with the following command:
docker run -p 8000:8000 SOON!
This command will start 2b2t tools and map it to port 5000 on your local machine.
Open your web browser and navigate to http://localhost:5000/docs to access the docs and api endpoints. Please note that Docker must be installed and running on your machine to execute these steps. If you don't have Docker installed, you can download it from here.
If you dont have Docker installed, you can easily get 2b2t tools up and running using python. Follow the steps below:
- Open your terminal.
- Clone the latest version of this repository using the following command:
git clone https://github.com/the-lodestone-project/2b2t-tools.git
- Move to the new directory:
cd 2b2t-tools
- Install all the dependencies using following command:
pip install -r requirements.txt
After cloning the repository and installing all the dependencies, run the python script with the following command:
python api/main.py
This command will start 2b2t tools and map it to port 5000 on your local machine.
Open your web browser and navigate to http://localhost:5000/docs to access the docs and api endpoints. Please note that Python and pip must be installed and running on your machine to execute these steps. If you don't have python and pip installed, you can download it from here.
The first time you run your bot, 2b2t tools will prompt you to log in. Follow the login prompts to authenticate your bots and connect it to 2b2t.org.
2b2t tools provides the following APIs to get bot and server info.
GET /api/bot/status
Get the current status of the monitoring bot.
Response
{
"position": "123",
"eta": "4h 10m",
"username": "MyBot"
}
position
: Queue position if in queue, elsenull
eta
: Estimated time to join if in queue, elsenull
username
: Bot's Minecraft username
GET /api/random
Get a random chat message from the database.
Response
"Goodbye cruel world"
Returns a random player chat message string.
GET /api/stats
Get stats on chat messages and players seen.
Response
{
"total_messages": 473293,
"total_players": 39482
}
total_messages
: Total chat messages loggedtotal_players
: Total unique players logged
GET /api/lookup/{username}
Get detailed info on a specific player.
Path parameter:
username
: The Minecraft username
Response
{
"username": "notch",
"uuid": "069a79f4-44e9-4726-a5be-fca90e38aaf5",
"first_join": "2009-05-17T12:33:14.083Z",
// other player stats...
}
GET /api/queue
Get the 2b2t queue lengths.
Response
{
"normal": 234,
"priority": 22
}
normal
: Normal queue lengthpriority
: Priority queue length
Name | Helped With | GitHub | Discord |
---|---|---|---|
Herodevc | database setup and ideas | @HeroDevc | Herodevc |
- Add all features from moobot.