类 EntityDeathEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
org.bukkit.event.entity.EntityDeathEvent
- 直接已知子类:
PlayerDeathEvent
当任何一个实体死亡时触发本事件
-
嵌套类概要
从类继承的嵌套类/接口 org.bukkit.event.Event
Event.Result
-
字段概要
从类继承的字段 org.bukkit.event.entity.EntityEvent
entity
-
构造器概要
构造器说明EntityDeathEvent
(LivingEntity entity, List<ItemStack> drops) EntityDeathEvent
(LivingEntity what, List<ItemStack> drops, int droppedExp) -
方法概要
修饰符和类型方法说明int
返回这个死亡的实体掉落的经验数量.getDrops()
返回这实体死亡掉落物品的集合返回这个事件所涉及的实体.static HandlerList
void
setDroppedExp
(int exp) 设置这个实体死亡所掉落的经验值数量.从类继承的方法 org.bukkit.event.entity.EntityEvent
getEntityType
从类继承的方法 org.bukkit.event.Event
getEventName, isAsynchronous
-
构造器详细资料
-
EntityDeathEvent
-
EntityDeathEvent
-
-
方法详细资料
-
getEntity
从类复制的说明:EntityEvent
返回这个事件所涉及的实体.原文: Returns the Entity involved in this event
- 覆盖:
getEntity
在类中EntityEvent
- 返回:
- 涉及这个事件的实体
-
getDroppedExp
public int getDroppedExp()返回这个死亡的实体掉落的经验数量.这不表明这个实体有多少经验值,而是它死亡时应该被创建多少掉落的经验值
原文: Gets how much EXP should be dropped from this death.
This does not indicate how much EXP should be taken from the entity in question, merely how much should be created after its death.
- 返回:
- 返回掉落的经验值数量
-
setDroppedExp
public void setDroppedExp(int exp) 设置这个实体死亡所掉落的经验值数量.这不表明这个实体有多少经验值,而是它死亡时应该被创建多少掉落的经验值
原文:Sets how much EXP should be dropped from this death.
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
- 掉落的经验值的数量
-
getDrops
返回这实体死亡掉落物品的集合Gets all the items which will drop when the entity dies
- 返回:
- 死亡时所掉落的所有物品
-
getHandlers
- 指定者:
getHandlers
在类中Event
-
getHandlerList
-