A Minecraft to Discord bot, interacting with PGM Match events to display match information live.
This project's structure is a modified version of Bolty, developed by applenick. Similarly, the project is also directly inspired by the #match-status channel located at the Overcast Community Discord server.
MatchBot will listen to MatchStartEvent and MatchFinishEvent to populate a Discord embed with information about a started or finished match.
MatchBot is built with JDA, an awesome Java library for Discord bots.
This bot runs best on a single Minecraft server, but can accommodate multiple servers (not proxies).
- First, clone or download the project's source code.
- Optionally, make your desired changes.
- Run the code formatter, following Google's code style.
mvn spotless:apply
- Compile the project.
mvn package
You'll find the bot's .jar file inside the target folder of the project's root directory.
MatchBot depends on PGM directly to work. Make sure your server has it installed.
- Drop the plugin's
.jarin your server'spluginsfolder. - Restart the server to automatically generate the bot's required files (
config.yml). - Fill in the blanks of the configuration file (
config.yml). To do this, you'll need the following:- A token for your Discord bot which you can get at the Discord Developer Portal.
- The ID of the server in which the bot will be functioning.
- The ID of the channel in which match embeds will be sent.
server-nameandmap-image-not-foundfields are optional.
- Restart the server once again for the changes to take place. Once your bot goes online, match embeds will be sent to the designated channel as soon as matches start or end.
You may look at a sample of the configuration file below. You can also find out how to get server, role or channel IDs here.
# MatchBot configuration file
# Discord settings
enabled: true # Enable Discord bot?
token: "" # Discord bot token
server: "" # ID of Discord server
match-channel: "" # ID of channel where match embeds will be sent
# Minecraft settings
server-name: "" # Name of the server (useful for networks)
# Image URL to display in the embed's thumbnail if a map image is not found
# Example: https://raw.githubusercontent.com/TBG1000/MapImages/main/map_image_not_found.png
map-image-not-found: ""