2nd disclaimer: This is a temp project, I don't plan to maintain it a lot, so ABSOLUTLY not production-ready!
A Minecraft-Discord integration system that allows communication between a Minecraft server and a Discord bot.
This project consists of two main components:
- Minecraft Plugin - A Paper/Spigot plugin that creates an HTTP API to expose Minecraft server data
- Discord Bot - A Python-based Discord bot that communicates with the Minecraft server
- HTTP API for accessing player and server information
- Automatic API key generation for security
- Server status notifications via Discord webhook
- Command handling system
- Player information commands
- Server status commands
- In-game messaging from Discord
/player infos <player>- Get detailed information about a player (health, experience, armor, etc.)/player advancements <player>- List all completed advancements for a player [NOT WORKING RN]. I'm working on a fix for this
/print <message>- Send a message to the Minecraft server chat/player-list- Show currently online players/time- Show current in-game time/weather- Show current in-game weather
- Build the plugin with Gradle:
cd mc-plugin ./gradlew build - Copy the generated JAR from
build/libs/RealCraftBridge-1.0-SNAPSHOT.jarto your server'spluginsfolder - Set the correct environment variables yourserverdir/.env:
DISCORD_WEBHOOK_URL- The webhook to send the status of the server (ex. [STATUS] Serveur allumé) 4 Start your Minecraft server
- An API key will be generated at the server root directory in
.api_key
- Create a .env file in the discord-bot directory (use .env.example as a template)
- Set the required environment variables:
MC_API- Copy from.api_keyin your Minecraft serverMC_HTTP_ADDRESS- URL to your Minecraft server's HTTP API (default:http://localhost:8090)DISCORD_TOKEN- Your Discord bot tokenGUILD_ID- Your Discord server ID
- Install dependencies:
pip install discord.py python-dotenv aiohttp - Run the bot:
python bot.py
- Java 21+
- Paper/Spigot Minecraft server 1.21+
- Python 3.9+
- discord.py
- python-dotenv
- aiohttp
This project is available under the Apache License 2.0.
- Lyam Zambaz
- Github Copilot for the readme