This commit allows the webhook username to be customized via the plugin config. Specifically, it adds a key "discord.webhook.webhook_username" to config.toml that is interpreted as the format of the webhook's username, replacing the variables {username} and {server} with the username and current server, respectively, of the player sending a Minecraft chat message.
I also took the liberty of reformatting the default config file, so feel free to crucify me for that :)
(on that note, it might be a good idea to reformat the config file (even more!) to make it more readable, but I figure I've gone far enough already)
Also, I merged the server connect methods, using ServerConnectedEvent rather than PlayerChooseInitialServerEvent and ServerPostConnectEvent separately. This fixes #11.
This commit allows the webhook username to be customized via the plugin config. Specifically, it adds a key "
discord.webhook.webhook_username
" toconfig.toml
that is interpreted as the format of the webhook's username, replacing the variables{username}
and{server}
with the username and current server, respectively, of the player sending a Minecraft chat message.Example:
[{server}] {username}
=[vanilla] player1
I also took the liberty of reformatting the default config file, so feel free to crucify me for that :) (on that note, it might be a good idea to reformat the config file (even more!) to make it more readable, but I figure I've gone far enough already)
Also, I merged the server connect methods, using
ServerConnectedEvent
rather thanPlayerChooseInitialServerEvent
andServerPostConnectEvent
separately. This fixes #11.