Zrips / CMI

116 stars 98 forks source link

Custom Death Messages aren't sent to Discord using DiscordSRV #9170

Open bobhenl opened 3 weeks ago

bobhenl commented 3 weeks ago

Description of Issue

Hello, when using:

# Not all death situations might be included and future updates might be needed
# Report any missing death situation you encountered to github issue section with exact way to reproduce death situation
EnableCustom: true

then it doesn't send the Discord webhooks when using the DiscordSRV:

[22:50:26] [Craft Scheduler Thread - 8223 - DiscordSRV/INFO]: [DiscordSRV] [UNCATEGORIZED DEBUG] Not sending death message for XXX, the death message is null

as you see, it's null, the devs of the DiscordSRV told me:

Whatever you're using to customize death messages is not compatible, they're improperly using the death event

If you can at least allow sending the default MC messages to DiscordSRV it would be so good!

How to setup? Use default configuration of DiscordSRV & just set the channel_id:

Channels: {"deaths": "CHANNEL_ID"}

in config.yml

Version Information

[22:59:53 INFO]: --------------------------------------------------
[22:59:53 INFO]: CMI: 9.7.6.3 SqLite
[22:59:53 INFO]: CMILib: 1.5.1.0 -> 1.5.1.4
[22:59:53 INFO]: Server: Paper(2309) 1.21.1-R0.1-SNAPSHOT-
[22:59:53 INFO]: CMI economy: Enabled Vault: 1.7.3-CMI CMI Chat: Disabled 
[22:59:53 INFO]: Modules -> 53 enabled 13 disabled: customMessages, mirror, tablist, skin, playerChatTag, disabledEnchants, chatBubble, ranks, firstJoinMessages, playerCombat, votifier, sitAnimation, namePlates
[22:59:53 INFO]: --------------------------------------------------
[22:59:54 INFO]: Cerebro2622 issued server command: /sethome a

Errors

No response

Relevant Config Sections

# Not all death situations might be included and future updates might be needed
# Report any missing death situation you encountered to github issue section with exact way to reproduce death situation
EnableCustom: true

Relevant Plugins

DiscordSRV

Agreements

Zrips commented 3 days ago

As of testing death messages looks to be working correctly with discordSrv, make sure that you have enabled

  DiscordSRV:
    # Enables support for DiscordSRV plugin
    Enabled: true

in chat.yml file and that you have MinecraftPlayerDeathMessage setup in discordsrv messages.yml file. And to address Whatever you're using to customize death messages is not compatible, they're improperly using the death event cmi sets original death message to "" aka empty field as it needs to prevent showing vanilla message or any message in general and then sends new message to receivers in json format with hover over features and similar stuff which isn't supported by default PlayerDeathEvent, so we can't do it in a "correct" way, but we do have direct support for DiscordSRV plugin to trigger message manually.