Question Get death message

  • After careful consideration and due to limited usage, we’ve made the decision to discontinue the PaperMC forums. Moving forward, we recommend using Hangar for plugin uploads, and for all other community discussions and support, please join us on Discord.
Mar 1, 2022
1
0
1
Hi.
I'm working on a plugin that when a player dies it sends a embed on discord
Here my code
Java:
@EventHandler(priority = EventPriority.MONITOR)
    public void onPlayerDeath(PlayerDeathEvent e){
        String deathMsg = PlainTextComponentSerializer.plainText().serialize(e.deathMessage());
        EmbedBuilder deathEventEmbed = new EmbedBuilder()
                .setTitle(deathMsg)
                .setDescription("Press F to pay respect!")
                .setColor(Color.YELLOW)
                ;
        chatChannel.sendMessageEmbeds(deathEventEmbed.build()).queue();
    }
But when I try to run, it's the result
1646112477117.png
So my question is Is there any way for me to get some message like: "Steve fell out of the world"

I'm new and thanks for yout help
[Sorry for my bad English]
 
Last edited: