# 程序包 org.bukkit.event.entity

package org.bukkit.event.entity
与`实体`相关的`事件`，不包括 一些直接引用的更具体的实体类型.

- 相关程序包
  程序包
  说明
  org.bukkit.event
  用于处理触发代码的执行的类.
- 类
  说明
  AreaEffectCloudApplyEvent
  当滞留药水应用它的效果时触发本事件，期间每5 tick发生一次。
  ArrowBodyCountChangeEvent
  当箭矢射进实体或从实体上拔出(脱落)时触发本事件.
  BatToggleSleepEvent
  当一只蝙蝠将要睡觉或醒来时触发本事件.
  CreatureSpawnEvent
  当一个生物体在世界中出生时触发该事件.
  CreatureSpawnEvent.SpawnReason
  生成原因的枚举类.
  CreeperPowerEvent
  当爬行者被闪电击中时触发该事件.
  CreeperPowerEvent.PowerCause
  造成这次强化的原因
  EnderDragonChangePhaseEvent
  Called when an EnderDragon switches controller phase.
  EntityAirChangeEvent
  当实体的氧气值发生变化时触发本事件
  EntityBreakDoorEvent
  当`实体`破坏门时触发本事件.
  EntityBreedEvent
  当一个实体与另一个实体交配繁殖时触发本事件.
  EntityChangeBlockEvent
  Called when any Entity changes a block and a more specific event is not available.
  EntityCombustByBlockEvent
  当方块造成实体燃烧时触发该事件.
  EntityCombustByEntityEvent
  当一个实体造成另外一个实体燃烧时触发该事件.
  EntityCombustEvent
  当实体燃烧时触发该事件
  EntityCreatePortalEvent
  已过时。
  请使用 `PortalCreateEvent`
  EntityDamageByBlockEvent
  当一个实体受到来自方块的伤害时触发该事件
  EntityDamageByEntityEvent
  当一个实体受到另外一个实体伤害时触发该事件
  EntityDamageEvent
  储存伤害事件的数据
  EntityDamageEvent.DamageCause
  造成伤害的原因.
  EntityDamageEvent.DamageModifier
  已过时。
  这个API被废弃了，具体见后面的网址，很快就要被移除了，就不深入解释了.This API is responsible for a large number of implementation problems and is in general unsustainable to maintain.
  EntityDeathEvent
  当一个实体死亡时触发本事件
  EntityDismountEvent
  Called when an entity stops riding another entity.
  EntityDropItemEvent
  Thrown when an entity creates an item drop.
  EntityEnterBlockEvent
  当`实体`进入方块, 保存到那个方块时触发本事件.
  EntityEnterLoveModeEvent
  当实体进入求爱模式时触发本事件.
  EntityEvent
  代表实体相关事件.
  EntityExhaustionEvent
  Called when a human entity experiences exhaustion.
  EntityExhaustionEvent.ExhaustionReason
  The reason for why a PlayerExhaustionEvent takes place
  EntityExplodeEvent
  当一个实体爆炸的时候触发本事件
  EntityInteractEvent
  当一个实体与其他物体互交时触发本事件
  EntityKnockbackByEntityEvent
  Called when an entity receives knockback from another entity.
  EntityKnockbackEvent
  Called when a living entity receives knockback.
  EntityKnockbackEvent.KnockbackCause
  An enum to specify the cause of the knockback.
  EntityMountEvent
  Called when an entity attempts to ride another entity.
  EntityPickupItemEvent
  当实体捡起地面上的掉落物时触发本事件.
  EntityPlaceEvent
  当一个实体因玩家在一个方块上"放置"一物品而创建时触发本事件.
  EntityPortalEnterEvent
  当一个实体与传送门接触时触发本事件.
  EntityPortalEvent
  当一个非玩家的实体被传送门传送时触发本事件
  EntityPortalExitEvent
  在实体退出传送门前触发本事件.
  EntityPoseChangeEvent
  当实体改变它的姿态时触发本事件.
  EntityPotionEffectEvent
  当实体上的药水效果发生改变时触发本事件.
  EntityPotionEffectEvent.Action
  指定对药水效果采取的动作的枚举.
  EntityPotionEffectEvent.Cause
  指定药水效果改变原因的枚举.
  EntityRegainHealthEvent
  当实体恢复生命值时触发本事件.
  EntityRegainHealthEvent.RegainReason
  详细说明实体生命值恢复原因的枚举.
  EntityRemoveEvent
  Called when an `Entity` is removed.
  EntityRemoveEvent.Cause
  Represents various ways an entity gets removed.
  EntityResurrectEvent
  当实体死亡并且有机会复活时触发本事件.
  EntityShootBowEvent
  Called when a LivingEntity shoots a bow firing an arrow
  EntitySpawnEvent
  当实体生成于世界内时触发本事件.
  EntitySpellCastEvent
  Called when a `Spellcaster` casts a spell.
  EntityTameEvent
  当生物实体被驯服时触发本事件.
  EntityTargetEvent
  Called when a creature targets or untargets another entity
  EntityTargetEvent.TargetReason
  An enum to specify the reason for the targeting
  EntityTargetLivingEntityEvent
  Called when an Entity targets a `LivingEntity` and can only target LivingEntity's.
  EntityTeleportEvent
  当非玩家实体从一处传送到另一处时触发本事件.
  EntityToggleGlideEvent
  Sent when an entity's gliding status is toggled with an Elytra.
  EntityToggleSwimEvent
  当实体游泳状态改变时触发本事件.
  EntityTransformEvent
  当实体将转化/蜕变为其它实体时触发本事件.
  EntityTransformEvent.TransformReason
  EntityUnleashEvent
  Called immediately prior to an entity being unleashed.
  EntityUnleashEvent.UnleashReason
  ExpBottleEvent
  Called when a ThrownExpBottle hits and releases experience.
  ExplosionPrimeEvent
  Called when an entity has made a decision to explode.
  FireworkExplodeEvent
  当烟花爆炸时触发本事件
  FoodLevelChangeEvent
  当一个人类实体的饥饿值发生变化时触发本事件
  HorseJumpEvent
  当马跳起时调用此事件.
  ItemDespawnEvent
  当`掉落物`存在时间超过5分钟后被移除时触发本事件 (注:掉落物存在时间因服务器配置和安装的插件而异).
  ItemMergeEvent
  ItemSpawnEvent
  当掉落物生成于某个世界时触发本事件.
  LingeringPotionSplashEvent
  Called when a splash potion hits an area
  PiglinBarterEvent
  Stores all data related to the bartering interaction with a piglin.
  PigZapEvent
  Stores data for pigs being zapped
  PigZombieAngerEvent
  Called when a Pig Zombie is angered by another entity.
  PlayerDeathEvent
  当一个`玩家`死亡时触发本事件
  PlayerLeashEntityEvent
  Called immediately prior to a creature being leashed by a player.
  PotionSplashEvent
  Called when a splash potion hits an area
  ProjectileHitEvent
  Called when a projectile hits an object
  ProjectileLaunchEvent
  当一个抛射物被发射时触发本事件.
  SheepDyeWoolEvent
  当羊身上的毛被染色时触发本事件.
  SheepRegrowWoolEvent
  当羊身上的羊毛重新长出时触发本事件.
  SlimeSplitEvent
  当史莱姆死亡后分裂成小史莱姆时触发本事件
  SpawnerSpawnEvent
  当刷怪笼刷出实体时触发本事件.
  StriderTemperatureChangeEvent
  Called when a `Strider`'s temperature has changed as a result of entering or exiting blocks it considers warm.
  TrialSpawnerSpawnEvent
  Called when an entity is spawned into a world by a trial spawner.
  VillagerAcquireTradeEvent
  Called whenever a villager acquires a new trade.
  VillagerCareerChangeEvent
  VillagerCareerChangeEvent.ChangeReason
  Reasons for the villager's profession changing.
  VillagerReplenishTradeEvent
  Called when a `Villager` is about to restock one of its trades.