Package net.minestom.server.event.player
Class PlayerDeathEvent
java.lang.Object
net.minestom.server.event.player.PlayerDeathEvent
- All Implemented Interfaces:
- Event,- EntityEvent,- EntityInstanceEvent,- InstanceEvent,- PlayerEvent,- PlayerInstanceEvent
Called when a player die in 
Player.kill().- 
Constructor SummaryConstructorsConstructorDescriptionPlayerDeathEvent(@NotNull Player player, Component deathText, Component chatMessage) 
- 
Method SummaryModifier and TypeMethodDescription@Nullable ComponentGets the message sent to chat.@Nullable ComponentGets the text displayed in the death screen.@NotNull PlayerGets the player.voidsetChatMessage(@Nullable Component chatMessage) Changes the text sent in chatvoidsetDeathText(@Nullable Component deathText) Changes the text displayed in the death screen.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minestom.server.event.trait.EntityInstanceEventgetInstanceMethods inherited from interface net.minestom.server.event.trait.PlayerEventgetEntity
- 
Constructor Details- 
PlayerDeathEvent
 
- 
- 
Method Details- 
getDeathTextGets the text displayed in the death screen.- Returns:
- the death text, can be null
 
- 
setDeathTextChanges the text displayed in the death screen.- Parameters:
- deathText- the death text to display, null to remove
 
- 
getChatMessageGets the message sent to chat.- Returns:
- the death chat message
 
- 
setChatMessageChanges the text sent in chat- Parameters:
- chatMessage- the death message to send, null to remove
 
- 
getPlayerDescription copied from interface:PlayerEventGets the player.- Specified by:
- getPlayerin interface- PlayerEvent
- Returns:
- the player
 
 
-