Package cn.nukkit.event.player
Class PlayerDeathEvent
java.lang.Object
cn.nukkit.event.Event
cn.nukkit.event.entity.EntityEvent
cn.nukkit.event.entity.EntityDeathEvent
cn.nukkit.event.player.PlayerDeathEvent
- All Implemented Interfaces:
Cancellable
-
Field Summary
Fields inherited from class cn.nukkit.event.entity.EntityEvent
entity
-
Constructor Summary
ConstructorDescriptionPlayerDeathEvent
(Player player, Item[] drops, TextContainer deathMessage, int experience) PlayerDeathEvent
(Player player, Item[] drops, String deathMessage, int experience) -
Method Summary
Modifier and TypeMethodDescriptionint
static HandlerList
boolean
boolean
void
setDeathMessage
(TextContainer deathMessage) Deprecated.void
setDeathMessage
(TranslationContainer deathMessage) void
setDeathMessage
(String deathMessage) Deprecated.void
setExperience
(int experience) void
setKeepExperience
(boolean keepExperience) void
setKeepInventory
(boolean keepInventory) Methods inherited from class cn.nukkit.event.entity.EntityDeathEvent
getDrops, setDrops
Methods inherited from class cn.nukkit.event.Event
getEventName, isCancelled, setCancelled, setCancelled
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface cn.nukkit.event.Cancellable
isCancelled, setCancelled, setCancelled
-
Constructor Details
-
PlayerDeathEvent
-
PlayerDeathEvent
-
-
Method Details
-
getHandlers
-
getEntity
- Overrides:
getEntity
in classEntityEvent
-
getDeathMessage
-
getTranslationDeathMessage
-
setDeathMessage
@PowerNukkitXOnly @Since("1.19.21-r4") public void setDeathMessage(TranslationContainer deathMessage) -
setDeathMessage
@Deprecated @DeprecationDetails(since="1.19.21-r4", reason="moved to TranslationContainer", replaceWith="setDeathMessage(TranslationContainer deathMessage)") public void setDeathMessage(TextContainer deathMessage) Deprecated. -
setDeathMessage
@Deprecated @DeprecationDetails(since="1.19.21-r4", reason="moved to TranslationContainer") public void setDeathMessage(String deathMessage) Deprecated. -
getKeepInventory
public boolean getKeepInventory() -
setKeepInventory
public void setKeepInventory(boolean keepInventory) -
getKeepExperience
public boolean getKeepExperience() -
setKeepExperience
public void setKeepExperience(boolean keepExperience) -
getExperience
public int getExperience() -
setExperience
public void setExperience(int experience)
-