A Forge mod that bridges your Minecraft server with Discord, inspired by DiscordSRV.
/discord linkโ ๏ธ This project requires Gradle 8.5 (ForgeGradle 6 is not compatible with Gradle 9+).
# Linux/Mac โ use the bundled Gradle 8.5
GRADLE_HOME=/opt/gradle-8.5 /opt/gradle-8.5/bin/gradle build
# Or if you have Gradle 8.x on PATH:
gradle build
The compiled JAR will be at build/libs/MiniatureDiscordSRV-1.20.1-1.0.0.jar.
mods/ folder.config/discordsrv-server.toml.This repository contains the mod source code and build scripts. The companion itzg-minecraft-server-forge directory in this workspace holds a complete Forge 1.20.1 server instance running in the itzg/minecraft-server Docker container.
gradle build (outputs build/libs/MiniatureDiscordSRV-1.20.1-1.0.0.jar).itzg-minecraft-server-forge/data-neoforge/mods/.cd itzg-minecraft-server-forge && docker-compose up -d.config/discordsrv-server.toml.The itzg-minecraft-server-forge directory contains the full server state:
data-neoforge/config/ โ all mod configurations, including discordsrv-server.toml.data-neoforge/mods/ โ the mods loaded on server startup (including this mod once youโve placed the JAR).data-neoforge/world/โฆ โ the generated world and player data.docker-compose.yml โ Forge 1.20.1 environment setup with JVM memory, MOTD, RCON, etc.๐ก Tip: Store your
discordsrv-server.tomlanddiscordsrv-links.jsonfiles (fromdata-neoforge/config/) in version control or backups. If you regenerate the world or container, you wonโt lose your Discord integration settings and linked accounts.
Edit config/discordsrv-server.toml:
[bot]
# Your Discord bot token
botToken = "YOUR_BOT_TOKEN_HERE"
# Your Discord server (guild) ID
serverId = "YOUR_SERVER_ID_HERE"
[channels]
# Channel ID for Minecraft <-> Discord chat
chatChannelId = ""
# Channel ID for console commands (leave empty to disable)
consoleChannelId = ""
# Channel ID for server online/offline status
statusChannelId = ""
[chat]
enabled = true
minecraftToDiscordFormat = "**{player}**: {message}"
discordToMinecraftFormat = "ยง9[Discord]ยงr <{user}> {message}"
[notifications]
notifyJoin = true
notifyLeave = true
notifyDeath = true
joinMessage = "โ
**{player}** joined the server."
leaveMessage = "โ **{player}** left the server."
deathMessage = "๐ **{player}** died: {cause}"
[console]
# Enable the console channel feature
enabled = false
# Discord role ID allowed to run commands (leave empty = everyone in that channel)
allowedRoleId = ""
[roleSync]
enabled = false
# Role ID to assign when a player links their account
linkedRoleId = ""
[status]
enabled = true
onlineMessage = "๐ข Server is now **online**!"
offlineMessage = "๐ด Server is now **offline**."
/discord link โ Get a 6-digit code (expires in 5 minutes)
/discord unlink โ Unlink your account
/discord status โ Check if your account is linked
/link <code> โ Link your Discord account using the code from Minecraft
Link data is saved to config/discordsrv-links.json and persists across server restarts.
Your bot needs the following permissions:
src/main/java/com/miniature/discordsrv/
โโโ MiniatureDiscordSRVMod.java Main mod class
โโโ config/
โ โโโ ModConfig.java Forge config spec
โโโ discord/
โ โโโ DiscordManager.java JDA lifecycle & message sender
โ โโโ DiscordChatListener.java Discord โ Minecraft chat
โ โโโ DiscordConsoleListener.java Discord โ Server console
โ โโโ DiscordSlashCommandListener.java /link slash command handler
โโโ listeners/
โ โโโ MinecraftEventListener.java Minecraft events โ Discord
โ โโโ ServerEventListener.java Server start/stop โ Discord
โ โโโ CommandListener.java /discord in-game commands
โโโ util/
โโโ LinkManager.java Account linking + persistence
MIT License โ ยฉ 2026 Josรฉ รngel Alejo Sillero