MiniatureDiscordSRV_JarStandalone

MiniatureDiscordSRV โ€” Minecraft Forge 1.20.1

A Forge mod that bridges your Minecraft server with Discord, inspired by DiscordSRV.

Features

Requirements

Building

โš ๏ธ 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.

Installation

  1. Copy the JAR to your serverโ€™s mods/ folder.
  2. Start the server once to generate the config file at config/discordsrv-server.toml.
  3. Stop the server and edit the config (see below).
  4. Restart the server.

Usage in a Docker/Forge server

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.

Quick start

  1. Build the mod: gradle build (outputs build/libs/MiniatureDiscordSRV-1.20.1-1.0.0.jar).
  2. Copy the JAR to itzg-minecraft-server-forge/data-neoforge/mods/.
  3. Start the server: cd itzg-minecraft-server-forge && docker-compose up -d.
  4. Wait for the server to start and generate config/discordsrv-server.toml.
  5. Edit the config with your Discord bot token, server ID, channel IDs, etc.
  6. Restart the server or reload the mod.

About the server repository

The itzg-minecraft-server-forge directory contains the full server state:

๐Ÿ’ก Tip: Store your discordsrv-server.toml and discordsrv-links.json files (from data-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.

Configuration

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**."

Account Linking

In Minecraft

/discord link    โ†’ Get a 6-digit code (expires in 5 minutes)
/discord unlink  โ†’ Unlink your account
/discord status  โ†’ Check if your account is linked

In Discord

/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.

Discord Bot Permissions

Your bot needs the following permissions:

Project Structure

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

License

MIT License โ€” ยฉ 2026 Josรฉ รngel Alejo Sillero