Jarva / VelocityCarbonDiscord

4 stars 2 forks source link

Use the CarbonPlayer provided by CarbonChatEvent instead of getting the Player from the proxy #5

Closed unilock closed 1 month ago

unilock commented 9 months ago

This PR makes use of the CarbonPlayer provided via CarbonChatEvent#sender as an Audience, making getting the Player from the proxy via ProxyServer#getPlayer unnecessary.
This also allows adding the player's display name (i.e. nickname via Carbon) as a placeholder in both discord.messages.chat_message and discord.webhook.username (and discord.webhook.avatar_url, but I'm not sure what the use case of that would be).

The config file has also been updated to list all placeholders provided by the plugin per config option. This fixes #4.

Jarva commented 6 months ago

Apologies for the delay, I didn't even notice this PR/issue was here. I'll be working on updates for VelocityCarbonDiscord soon and will include these changes then

unilock commented 6 months ago

In that case, you might also be interested in my more up-to-date branch, which adds support for advancement and death messages, among other things: https://github.com/unilock/VelocityCarbonDiscord/tree/serverdisconnectmsg