Package org.bukkit.event.entity

# Class EntityEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent

Direct Known Subclasses:
  `AreaEffectCloudApplyEvent`, `ArrowBodyCountChangeEvent`, `BatToggleSleepEvent`, `CreeperIgniteEvent`, `CreeperPowerEvent`, `ElderGuardianAppearanceEvent`, `EnderDragonChangePhaseEvent`, `EnderDragonFireballHitEvent`, `EnderDragonFlameEvent`, `EnderDragonShootFireballEvent`, `EndermanAttackPlayerEvent`, `EndermanEscapeEvent`, `EntityAddToWorldEvent`, `EntityAirChangeEvent`, `EntityBreedEvent`, `EntityChangeBlockEvent`, `EntityCombustEvent`, `EntityCreatePortalEvent`, `EntityDamageEvent`, `EntityDamageItemEvent`, `EntityDeathEvent`, `EntityDismountEvent`, `EntityDropItemEvent`, `EntityDyeEvent`, `EntityEnterBlockEvent`, `EntityEnterLoveModeEvent`, `EntityExhaustionEvent`, `EntityExplodeEvent`, `EntityInsideBlockEvent`, `EntityInteractEvent`, `EntityJumpEvent`, `EntityKnockbackByEntityEvent`, `EntityLoadCrossbowEvent`, `EntityMountEvent`, `EntityMoveEvent`, `EntityPathfindEvent`, `EntityPickupItemEvent`, `EntityPlaceEvent`, `EntityPortalEnterEvent`, `EntityPoseChangeEvent`, `EntityPotionEffectEvent`, `EntityRegainHealthEvent`, `EntityRemoveFromWorldEvent`, `EntityResurrectEvent`, `EntityShootBowEvent`, `EntitySpawnEvent`, `EntitySpellCastEvent`, `EntityTameEvent`, `EntityTargetEvent`, `EntityTeleportEvent`, `EntityToggleGlideEvent`, `EntityToggleSwimEvent`, `EntityTransformedEvent`, `EntityTransformEvent`, `EntityUnleashEvent`, `ExperienceOrbMergeEvent`, `ExplosionPrimeEvent`, `FireworkExplodeEvent`, `FoodLevelChangeEvent`, `HorseJumpEvent`, `ItemDespawnEvent`, `ItemMergeEvent`, `PiglinBarterEvent`, `PigZombieAngerEvent`, `ProjectileCollideEvent`, `ProjectileHitEvent`, `PufferFishStateChangeEvent`, `SheepRegrowWoolEvent`, `SkeletonHorseTrapEvent`, `SlimePathfindEvent`, `SlimeSplitEvent`, `StriderTemperatureChangeEvent`, `TameableDeathMessageEvent`, `TurtleGoHomeEvent`, `TurtleLayEggEvent`, `TurtleStartDiggingEvent`, `VillagerAcquireTradeEvent`, `VillagerCareerChangeEvent`, `VillagerReplenishTradeEvent`, `WitchConsumePotionEvent`, `WitchReadyPotionEvent`, `WitchThrowPotionEvent`

public abstract class EntityEvent extends Event
Represents an Entity-related event

## Nested Class Summary

## Nested classes/interfaces inherited from class org.bukkit.event.Event

`Event.Result`

## Field Summary

Fields
Modifier and Type
Field
Description
`protected Entity`
`entity`

## Constructor Summary

Constructors
Constructor
Description
`EntityEvent(@NotNull Entity what)`

## Method Summary

Modifier and Type
Method
Description
`@NotNull Entity`
`getEntity()`
Returns the Entity involved in this event
`@NotNull EntityType`
`getEntityType()`
Gets the EntityType of the Entity involved in this event.

### Methods inherited from class org.bukkit.event.Event

`callEvent, getEventName, getHandlers, isAsynchronous`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### entity

protected Entity entity

## Constructor Details

### EntityEvent

public EntityEvent(@NotNull @NotNull Entity what)

## Method Details

### getEntity

@NotNull public @NotNull Entity getEntity()
Returns the Entity involved in this event

Returns:
  Entity who is involved in this event

### getEntityType

@NotNull public @NotNull EntityType getEntityType()
Gets the EntityType of the Entity involved in this event.

Returns:
  EntityType of the Entity involved in this event