Skip to content
denisnumb edited this page May 30, 2026 · 2 revisions

The mod supports sending messages to Discord using webhooks.

By default, all messages sent to Discord from Minecraft are sent to the channel on behalf of the connected bot.

Webhook mode allows you to send player messages with the player's avatar and game nickname displayed as the bot's name and avatar.

For example, a player sent a message in the chat:

image

In normal mode, a message will be sent to Discord from the bot, indicating the player's nickname:

image

And with webhook mode enabled, this message will look like this:

image

Note

You can read more about webhooks on the official Discord page

Webhook Mode Configuration

The webhook mode configuration is located in the [webhookModeConfig] config section and looks like this:

[webhookModeConfig]
	# If true, server and player messages will be sent in webhook mode.
	# [!] Webhook mode works only in regular channels (Threads does not work)
	# [!] The bot must have Manage Webhooks permission
	enableWebhookMode = false
	# Webhook name for displaying server messages
	webhookServerName = "Minecraft Server"
	# Avatar url for the webhook for displaying server messages
	# Leave blank to display the connected bot's avatar
	webhookServerAvatarUrl = ""
	# If true, then all players will have access to the /set_avatar_url <url> command to set a custom avatar, which will be used instead of the webhookPlayerAvatarUrl parameter.
	# The /remove_avatar_url command will also be available to remove an avatar.
	enableSetAvatarUrlCommand = true
	# Url to get the player's display avatar
	# You can specify a link with dynamic parameters <uuid> and <name>, which will be automatically substituted when requesting an image
	# <uuid> — player's UUID
	# <name> — player's nickname
	# Default: https://mc-heads.net/avatar/<name>.png
	webhookPlayerAvatarUrl = "https://mc-heads.net/avatar/<name>.png"
	# Url to get the player's display avatar if dynamic link is invalid
	# Default: https://mc-heads.net/avatar/steve_head_png
	webhookPlayerDefaultAvatarUrl = "https://mc-heads.net/avatar/steve_head_png"

To enable webhook mode, simply set the parameter:

enableWebhookMode = true

When connected to Discord, the bot will create a webhook in each channel according to the specified settings.

Warning

It is important that the bot has the Manage Webhooks permission!

Warning

Discord doesn't allow webhooks to be created in threads. This feature will only work in regular text channels.

In channels where the bot cannot create a webhook for any reason, the normal mode of sending messages on behalf of the bot will be used.


Let's look at the configuration parameters in order.

Server Name and Avatar

By default, all messages sent on behalf of players are sent with their nickname and avatar.

Other messages, such as death and achievement notifications, are sent on behalf of the server. You can also specify a separate avatar and server display name for these messages.

ℹ️ The webhookServerName parameter allows you to set the webhook display name for messages sent on behalf of the server. By default, this parameter is set to Minecraft Server, but you can change it to any other value.

webhookServerName = "Minecraft Server"

ℹ️ The webhookServerAvatarUrl parameter allows you to set the webhook avatar displayed for messages sent on behalf of the server. By default, this parameter is empty; in this case, the avatar of the connected bot will be used.

To install any other avatar, you can specify direct link to the image:

webhookServerAvatarUrl = "https://i.ibb.co/sJRmc5wJ/icon.png"

Now, for example achievement messages will look like this:

image

Player Avatar

The remaining parameters allow you to determine which avatar will be displayed in messages sent by players.

Let's start with webhookPlayerAvatarUrl:

# Url to get the player's display avatar
# You can specify a link with dynamic parameters <uuid> and <name>, which will be automatically substituted when requesting an image
# <uuid> — player's UUID
# <name> — player's nickname
# Default: https://mc-heads.net/avatar/<name>.png
webhookPlayerAvatarUrl = "https://mc-heads.net/avatar/<name>.png"

ℹ️ This parameter is set as a direct link to an image.

You can set a static link to a specific image, and then it will be displayed as the avatar of any player who sends a message.

You can also set dynamic parameters in the link, which will be substituted when the player sends a message:

  • <name> — The player's nickname will be substituted for <name> in the link
  • <uuid> — Instead of <uuid> the player's uuid will be substituted into the link

By default, the parameter is set as a link to a service that returns an image of a player's head, depending on their nickname.

You can read more about service API here: https://mc-heads.net/

For example, in my case, when sending a message, the following link will be generated: https://mc-heads.net/avatar/denisnumb.png

And the message will look like the example at the top of the page:

image

If necessary, you can specify a link to another service that returns an image based on the player's nickname or UUID.

ℹ️ The webhookPlayerDefaultAvatarUrl parameter is required in case the service crashes for some reason or the generated link is invalid. In this case, the link specified in this parameter will be used. By default, this is a link to Steve's avatar from Minecraft.


ℹ️ If for some reason the player's avatar is not in the service database, or if the player wants to set their own custom avatar, they can use the in-game command /set_avatar_url

For example: /set_avatar_url https://avatars.githubusercontent.com/u/61795655?v=4:

image

Result in discord:

image image

ℹ️ To remove an avatar, a player can use the command /remove_avatar_url


ℹ️ In the configuration file, the enableSetAvatarUrlCommand parameter allows you to disable this command if needed—for example, if a server administrator wants to restrict players' ability to set their own images as avatars.

By default, the /set_avatar_url command is enabled:

enableSetAvatarUrlCommand = true

Clone this wiki locally