A Hytale plugin that links in-game events to a Discord channel using a webhook. This plugin automatically sends player join, leave, deaths, chat messages, and server lifecycle events to your Discord server.
Current Features
- Event Configuration System: Individual configuration files for each event type
- Placeholder System: Dynamic placeholders like
{player}, {message}, {deathCause}, {time}, etc.
- Timezone Support: Time placeholders with timezone control (e.g.,
{time-america/los_angeles})
- Multiple Webhook Channels: Route different events to different Discord channels
- Message Customization: Full control over message format (embeds, plain text, or both)
- Event Toggling: Enable or disable individual events
- Update Check: Check Github releases for updates and notifies you if there is one
- Hot Reload: Reload configuration without restarting the server using
/dw-reload
- Default Event Templates: Default event configurations are automatically copied from resources on first launch
Current Events
- Player Join Events: Sends customizable notifications when a player joins the server
- Player Leave Events: Sends customizable notifications when a player leaves the server
- Player Death Events: Sends customizable notifications when a player dies on the server
- Player Chat: Forwards all player chat messages to Discord with full customization
- Server Boot: Sends a notification when the server starts up
- Server Shutdown: Sends a notification when the server shuts down
Installation
- Download the latest release from the releases page
- Place the
DiscordWebhook-x.x.x.jar file into your Hytale server's mods folder
- Start your server to generate the configuration files
- Edit the
Jemsire_DiscordWebhook/WebhookConfig.json file and add your Discord webhook URL(s)
- (Optional) Customize individual event configs in
Jemsire_DiscordWebhook/events/ folder
- In-game type
/dw-reload to hot reload the config to start the plugin
Note: Default event configurations are automatically created on first launch. You can customize them or leave them as-is.
Configuration
After first launch, configuration files will be created in your mods folder. The plugin uses a two-tier configuration system:
- WebhookConfig.json: Main configuration with webhook URLs and channels
- events/: Individual event configuration files
Getting a Discord Webhook URL
- Open your Discord server settings
- Go to Integrations β Webhooks
- Click New Webhook or select an existing webhook
- Copy the webhook URL
- Paste it into your
WebhookConfig.json file
Main Configuration File (WebhookConfig.json)
The main configuration file is located at Jemsire_DiscordWebhook/WebhookConfig.json:
{
"WebhookLink": "https://discord.com/api/webhooks/YOUR_WEBHOOK_URL_HERE",
"Version": 2,
"UpdateCheck": true,
"WebhookChannels": {
"default": "https://discord.com/api/webhooks/YOUR_DEFAULT_WEBHOOK_URL",
"staff": "https://discord.com/api/webhooks/YOUR_STAFF_WEBHOOK_URL"
}
}
Configuration Options:
WebhookLink: Default webhook URL (used as fallback)
Version: Configuration version (currently 2)
UpdateCheck: Enable/disable automatic update checking
WebhookChannels: Map of channel names to webhook URLs (e.g., "default", "staff", "admin")
Event Configuration Files
Each event has its own configuration file in Jemsire_DiscordWebhook/events/. Default configs are automatically created on first launch:
PlayerChat.json - Player chat messages
PlayerConnect.json - Player connect events
PlayerDisconnect.json - Player leave events
PlayerDeath.json - Player death events
Boot.json - Server startup events
Shutdown.json - Server shutdown events
Event Configuration Structure
{
"Enabled": true,
"WebhookChannel": "default",
"MessageJson": "{\"content\": \"π¬ **{player}**: {message}\"}"
}
Configuration Options:
Enabled: Enable or disable this event (true/false)
WebhookChannel: Which webhook channel to use (must match a key in WebhookChannels from main config)
MessageJson: Raw Discord webhook JSON with placeholders (see below)
Message Format Examples
Plain Text Message:
{
"Enabled": true,
"WebhookChannel": "default",
"MessageJson": "{\"content\": \"π¬ **{player}**: {message}\"}"
}
Embed Message:
{
"Enabled": true,
"WebhookChannel": "default",
"MessageJson": "{\"embeds\": [{\"title\": \"π₯ Player Joined\", \"description\": \"{player} has entered the world!\", \"color\": 65280}]}"
}
Combined (Text + Embed):
{
"Enabled": true,
"WebhookChannel": "default",
"MessageJson": "{\"content\": \"New player!\", \"embeds\": [{\"title\": \"Player Joined\", \"description\": \"{player} joined the server\", \"color\": 65280}]}"
}
Server Event with Timezone:
{
"Enabled": true,
"WebhookChannel": "default",
"MessageJson": "{\"embeds\": [{\"title\": \"π Server Started\", \"description\": \"Server started at {time-america/los_angeles}\", \"color\": 3447003}]}"
}
Available Placeholders
Placeholders are replaced at runtime with actual values. Use {placeholderName} in your JSON strings.
Player Placeholders:
{player} - Player's username or display name (context-dependent)
{playerUsername} - Player's username (alias)
{playerDisplayName} - Player's display name (alias)
{playerUuid} - Player's UUID (if available)
Chat Placeholders:
{message} - Chat message content
{content} - Chat message content (alias)
Death Placeholders:
{deathCause} - Formatted death message
{deathMessage} - Formatted death message (alias)
{deathMessageRaw} - Raw death message (if available)
Time Placeholders:
{time} - Current time in server's default timezone (format: yyyy-MM-dd HH:mm:ss z)
{time-<timezone>} - Current time in a specific timezone (e.g., {time-america/los_angeles})
Timezone Examples:
{time-america/los_angeles} - Pacific Time (PST/PDT)
{time-america/new_york} - Eastern Time (EST/EDT)
{time-america/chicago} - Central Time (CST/CDT)
{time-america/denver} - Mountain Time (MST/MDT)
{time-europe/london} - UK Time (GMT/BST)
{time-europe/paris} - Central European Time (CET/CEST)
{time-asia/tokyo} - Japan Standard Time (JST)
{time-australia/sydney} - Australian Eastern Time (AEST/AEDT)
{time-utc} - Coordinated Universal Time (UTC)
Timezone Notes:
- Timezone names are case-insensitive (e.g.,
AMERICA/LOS_ANGELES works the same as america/los_angeles)
- Any valid Java timezone ID can be used (see IANA Time Zone Database)
- If an invalid timezone is specified, the system will default to UTC and log a warning to the console
- Time format includes the timezone abbreviation (e.g., "2026-01-25 10:30:45 PST")
Note: Some placeholders won't work in some events. Placeholders are automatically escaped for JSON, so special characters won't break your webhook payload.
Commands
/dw-reload - Reloads the plugin configuration without restarting the server
- Permission:
discordwebhook.reload
- Usage: Only reloads if the configuration has changed
This project is open-source:
Feel free to contribute or spin it into your own system! Check out the Github
Want to get updates for all my projects?