Herald is a Minecraft server plugin that sends Discord notifications when players join the server. Email notifications are also supported as a secondary option.
- Discord webhook notifications for player logins (flagship feature)
- Email notification system for player logins (optional, secondary)
- Configurable notification methods (Discord, email, or both)
- Easy to configure and use
- Built-in mail server setup with Docker (for email testing)
- Minecraft server with version 1.16 or higher
- Java runtime environment
- Docker and Docker Compose (optional, for email server setup only)
- Download the Herald plugin JAR file
- Place the JAR file in your server's
pluginsfolder - Restart your server or use a plugin manager to load the plugin
- Configure the plugin settings as needed
After first run, a configuration file will be created that you can modify to set up your notification preferences.
Update your Herald config.yml:
# Herald Configuration
# Server name used in notification messages (replaces {server} placeholder).
# If left empty, defaults to "Minecraft".
server-name: ""
# Discord Configuration (flagship feature)
discord:
enabled: false # Set to true to enable Discord notifications
webhook-url: "" # Your Discord webhook URL
join-messages: # Messages picked at random on player join
- "⚔️ Hear ye, hear ye! **{player}** hath entered the realm of **{server}**! ⚔️"
- "🏰 The gates of **{server}** open wide for **{player}**! Welcome, brave soul!"
- "📜 By royal decree, **{player}** hath been granted passage into **{server}**!"
- "🗡️ A new champion approaches! **{player}** rides into **{server}**!"
- "🌟 The bards shall sing of this day! **{player}** hath arrived in **{server}**!"
- "👑 All hail **{player}**, who now graces the lands of **{server}**!"
- "🔥 The torches flicker as **{player}** strides into **{server}**!"
- "🎺 Sound the trumpets! **{player}** hath joined the kingdom of **{server}**!"
- "🛡️ The defenders of **{server}** welcome **{player}** to their ranks!"
- "✨ By the stars above, **{player}** hath made their presence known in **{server}**!"
# Email Configuration (optional)
email-recipients: []
smtp:
server: ""
port: 587
username: ""
password: ""
use-tls: true
email:
sender: ""Discord is the recommended way to receive player join notifications.
- In your Discord server, go to Server Settings → Integrations → Webhooks
- Click New Webhook
- Configure the webhook:
- Set a name (e.g., "Herald Bot")
- Choose the channel where notifications should be sent
- Copy the webhook URL
- In your Herald
config.yml, set:discord.enabled: truediscord.webhook-url: "<your-webhook-url>"server-name: "My Awesome Server"(optional — sets the name used in{server}placeholders; defaults to"Minecraft")
- Optionally customize the join messages by editing the
discord.join-messageslist. Use{player}and{server}as placeholders. A random message is chosen each time a player joins. - Restart your Minecraft server or reload the plugin
By default, Herald ships with 10 medieval-themed messages that are chosen at random, such as ⚔️ Hear ye, hear ye! **Steve** hath entered the realm of **My Server**! ⚔️. You can add, remove, or replace messages in the config.
You can use Discord notifications alone, email alone, or both together.
Use the included test scripts to verify your webhook before deploying:
# Bash (requires Java)
./test-discord-webhook.sh https://discord.com/api/webhooks/YOUR_ID/YOUR_TOKEN
# Python
python3 test-discord-webhook.py https://discord.com/api/webhooks/YOUR_ID/YOUR_TOKENSee DISCORD_TESTING.md for full documentation.
Email is a secondary notification method. If you want to use it, Herald requires an SMTP server. A Docker Compose setup is included for easy local testing.
-
Make sure Docker and Docker Compose are installed on your system
-
Use the included
compose.ymlfile to start the mail services:docker compose up -d
-
Configure your Herald plugin to use the mail server (see configuration section above)
-
Access the MailHog web interface at http://localhost:8025 to view all sent emails
This setup creates two mail-related services:
- mailserver: A Postfix mail server that accepts emails from your Herald plugin
- mailhog: A mail catcher that captures all outgoing emails for easy viewing
All emails sent to the mail server are relayed to MailHog, where you can view them in a convenient web interface.
The Docker Compose setup includes a test Minecraft server that can be used to test the Herald plugin:
services:
testmcserver:
build: .
image: herald-test-mc-server
container_name: herald-test-mc-server
ports:
- "25565:25565"
volumes:
- type: bind
source: ./testmcserver
target: /testmcserver
environment:
- MINECRAFT_VERSION=${MINECRAFT_VERSION}
- OPERATOR_UUID=${OPERATOR_UUID}
- OPERATOR_NAME=${OPERATOR_NAME}
- OPERATOR_LEVEL=${OPERATOR_LEVEL}
- OVERWRITE_EXISTING_SERVER=${OVERWRITE_EXISTING_SERVER}
networks:
- mail-networkEnvironment variables can be configured in a .env file (sample provided).
All emails sent by the Herald plugin will be captured by MailHog. To view them:
- Open your web browser
- Go to http://localhost:8025
- View and inspect all sent emails in the MailHog interface
- Discord messages not appearing: Verify your webhook URL is correct and the channel exists. Run
./test-discord-webhook.shto test without a server. - Emails not showing up in MailHog: Make sure your Herald plugin is configured with the correct server address and port.
- Connection refused errors: Verify that the Docker containers are running with
docker psand that you're using the correct address. - Authentication failures: This setup doesn't require authentication by default; make sure username and password fields are empty in your Herald config.
This setup is primarily intended for development and testing. For production use:
- Remove the
RELAYHOSTenvironment variable from the mailserver service - Configure proper DNS records for your mail server
- Set up TLS certificates for secure email transmission
- Consider adding spam protection measures
The project uses the Gradle wrapper for building. This ensures all contributors use the same Gradle version without needing a system install.
# Build the plugin JAR
./gradlew build
# Run unit tests
./gradlew test
# Build without running tests
./gradlew build -x testOn Windows, use gradlew.bat instead:
gradlew.bat build
gradlew.bat testThe built JAR is located at build/libs/. The wrapper will automatically download the correct Gradle version on first use.
- Daniel McCoy Stephenson
This project is licensed under the GNU General Public License v3.0 (GPL-3.0).
You are free to use, modify, and distribute this software, provided that:
- Source code is made available under the same license when distributed.
- Changes are documented and attributed.
- No additional restrictions are applied.
See the LICENSE file for the full text of the GPL-3.0 license.