PlayerDeathEvent
public class EntityDeathEvent extends EntityEvent
Event.Result
entity
Constructor | Description |
---|---|
EntityDeathEvent(@NotNull LivingEntity entity,
@NotNull List<ItemStack> drops) |
|
EntityDeathEvent(@NotNull LivingEntity what,
@NotNull List<ItemStack> drops,
int droppedExp) |
Modifier and Type | Method | Description |
---|---|---|
int |
getDroppedExp() |
Gets how much EXP should be dropped from this death.
|
@NotNull List<ItemStack> |
getDrops() |
Gets all the items which will drop when the entity dies
|
@NotNull LivingEntity |
getEntity() |
Returns the Entity involved in this event
|
static @NotNull HandlerList |
getHandlerList() |
|
@NotNull HandlerList |
getHandlers() |
|
void |
setDroppedExp(int exp) |
Sets how much EXP should be dropped from this death.
|
getEntityType
getEventName, isAsynchronous
public EntityDeathEvent(@NotNull @NotNull LivingEntity entity, @NotNull @NotNull List<ItemStack> drops)
public EntityDeathEvent(@NotNull @NotNull LivingEntity what, @NotNull @NotNull List<ItemStack> drops, int droppedExp)
@NotNull public @NotNull LivingEntity getEntity()
EntityEvent
getEntity
in class EntityEvent
public int getDroppedExp()
This does not indicate how much EXP should be taken from the entity in question, merely how much should be created after its death.
public void setDroppedExp(int exp)
This does not indicate how much EXP should be taken from the entity in question, merely how much should be created after its death.
exp
- Amount of EXP to drop.@NotNull public @NotNull List<ItemStack> getDrops()
@NotNull public @NotNull HandlerList getHandlers()
getHandlers
in class Event
@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2020. All rights reserved.