A Hytale plugin to display chat and events in discord using only a webhook.
A Hytale server plugin that links in-game events to a Discord channel using a webhook. This plugin automatically sends player join, leave, deaths, and chat messages to your Discord server.
{player}, {message}, {deathCause}, etc./dw-reloadDiscordWebhook-x.x.x.jar file into your Hytale server's mods folderJemsire_DiscordWebhook/WebhookConfig.json file and add your Discord webhook URL(s)Jemsire_DiscordWebhook/events/ folder/dw-reload to hot reload the config to start the pluginNote: Default event configurations are automatically created on first launch. You can customize them or leave them as-is.
After first launch, configuration files will be created in your mods folder. The plugin uses a two-tier configuration system:
WebhookConfig.json fileThe 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 checkingWebhookChannels: Map of channel names to webhook URLs (e.g., "default", "staff", "admin")Each event has its own configuration file in Jemsire_DiscordWebhook/events/. Default configs are automatically created on first launch:
PlayerChat.json - Player chat messagesPlayerReady.json - Player join eventsPlayerDisconnect.json - Player leave eventsPlayerDeath.json - Player death 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}]}"
}#### Available Placeholders
Placeholders are replaced at runtime with actual values. Use {placeholderName} in your JSON strings.
{player} - Player's username{playerUsername} - Player's username (alias){message} - Chat message content{content} - Chat message content (alias){playerUuid} - Player's UUID (if available){deathCause} - Formatted death message{deathMessage} - Formatted death message (alias){deathMessageRaw} - Raw death message (if available)Note: Some Placeholders wont work in some events. Placeholders are automatically escaped for JSON, so special characters won't break your webhook payload.
/dw-reload - Reloads the plugin configuration without restarting the serverdiscordwebhook.reloadFeel free to contribute or spin it into your own system! Check out the Github
Join the discord! Join Now!
0 Comments