Interface DestructEntityEvent.Death
- 
- All Superinterfaces:
- AudienceMessageEvent,- Cancellable,- DestructEntityEvent,- Event,- MessageCancellable,- MessageEvent
 - Enclosing interface:
- DestructEntityEvent
 
 public static interface DestructEntityEvent.Death extends DestructEntityEvent, Cancellable A derivative ofDestructEntityEventwhere the removal of theLiving, theDestructEntityEvent.entity(), is due to it losing its health.Note that cancelling this event will have the implication that the entity will have restored health and not enter a "death" state to play a dying animation, drop items, and drop experience. It is highly encouraged to keep the cancellation of this event at a mimium as in modded environments, cancelling this event may have other implications that mods may not consider and cause bugs. 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.spongepowered.api.event.entity.DestructEntityEventDestructEntityEvent.Death
 
- 
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description Livingentity()Gets theEntity.booleankeepInventory()Returns whether the inventory is kept after death.voidsetKeepInventory(boolean keepInventory)Applies theGameRules.KEEP_INVENTORYgamerule to this entity alone.- 
Methods inherited from interface org.spongepowered.api.event.message.AudienceMessageEventaudience, filterAudience, originalAudience, setAudience
 - 
Methods inherited from interface org.spongepowered.api.event.CancellableisCancelled, setCancelled
 - 
Methods inherited from interface org.spongepowered.api.event.message.MessageCancellableisMessageCancelled, setMessageCancelled
 - 
Methods inherited from interface org.spongepowered.api.event.message.MessageEventmessage, originalMessage, setMessage
 
- 
 
- 
- 
- 
Method Detail- 
entityLiving entity() Description copied from interface:DestructEntityEventGets theEntity.- Specified by:
- entityin interface- DestructEntityEvent
- Returns:
- The entity
 
 - 
setKeepInventoryvoid setKeepInventory(boolean keepInventory) Applies theGameRules.KEEP_INVENTORYgamerule to this entity alone.This only works for players - Parameters:
- keepInventory- Whether to keep the inventory on death
 
 - 
keepInventoryboolean keepInventory() Returns whether the inventory is kept after death.By default this is the same as the GameRules.KEEP_INVENTORYgamerule.- Returns:
- Whether the inventory is kept after death.
 
 
- 
 
-