Package org.bukkit.event.entity

# Enum Class EntityPotionEffectEvent.Cause

java.lang.Object
java.lang.Enum<EntityPotionEffectEvent.Cause>
org.bukkit.event.entity.EntityPotionEffectEvent.Cause

All Implemented Interfaces:
  `Serializable`, `Comparable<EntityPotionEffectEvent.Cause>`, `Constable`

Enclosing class:
  EntityPotionEffectEvent

public static enum EntityPotionEffectEvent.Cause extends Enum<EntityPotionEffectEvent.Cause>
An enum to specify the cause why an effect was changed.

## Nested Class Summary

## Nested classes/interfaces inherited from class java.lang.Enum

`Enum.EnumDesc<E extends Enum<E>>`

## Enum Constant Summary

Enum Constants
Enum Constant
Description
`AREA_EFFECT_CLOUD`
When the entity stands inside an area effect cloud.
`ARROW`
When the entity is hit by an spectral or tipped arrow.
`ATTACK`
When the entity is inflicted with a potion effect due to an entity attack (e.g.
`AXOLOTL`
When an entity gets the effect from an axolotl.
`BEACON`
When beacon effects get applied due to the entity being nearby.
`COMMAND`
When a potion effect is changed due to the /effect command.
`CONDUIT`
When the entity gets the effect from a conduit.
`CONVERSION`
When a conversion from a villager zombie to a villager is started or finished.
`DEATH`
When all effects are removed due to death (Note: This is called on respawn, so it's player only!)
`DOLPHIN`
When the entity gets the effect from a dolphin.
`EXPIRATION`
When the effect was removed due to expiration.
`FOOD`
When an effect is inflicted due to food (e.g.
`ILLUSION`
When an illusion illager makes himself disappear.
`MILK`
When all effects are removed due to a bucket of milk.
`PATROL_CAPTAIN`
When a player gets bad omen after killing a patrol captain.
`PLUGIN`
When a potion effect is modified through the plugin methods.
`POTION_DRINK`
When the entity drinks a potion.
`POTION_SPLASH`
When the entity is inflicted with an effect due to a splash potion.
`SPIDER_SPAWN`
When a spider gets effects when spawning on hard difficulty.
`TOTEM`
When the entity gets effects from a totem item saving it's life.
`TURTLE_HELMET`
When the entity gets water breathing by wearing a turtle helmet.
`UNKNOWN`
When the Cause is missing.
`VILLAGER_TRADE`
When a villager gets regeneration after a trade.
`WITHER_ROSE`
When an entity comes in contact with a wither rose.

## Method Summary

Modifier and Type
Method
Description
`static EntityPotionEffectEvent.Cause`
`valueOf(String name)`
Returns the enum constant of this class with the specified name.
`static EntityPotionEffectEvent.Cause[]`
`values()`
Returns an array containing the constants of this enum class, in the order they are declared.

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

`clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

`getClass, notify, notifyAll, wait, wait, wait`

## Enum Constant Details

### AREA_EFFECT_CLOUD

public static final EntityPotionEffectEvent.Cause AREA_EFFECT_CLOUD
When the entity stands inside an area effect cloud.

### ARROW

public static final EntityPotionEffectEvent.Cause ARROW
When the entity is hit by an spectral or tipped arrow.

### ATTACK

public static final EntityPotionEffectEvent.Cause ATTACK
When the entity is inflicted with a potion effect due to an entity attack (e.g. a cave spider or a shulker bullet).

### AXOLOTL

public static final EntityPotionEffectEvent.Cause AXOLOTL
When an entity gets the effect from an axolotl.

### BEACON

public static final EntityPotionEffectEvent.Cause BEACON
When beacon effects get applied due to the entity being nearby.

### COMMAND

public static final EntityPotionEffectEvent.Cause COMMAND
When a potion effect is changed due to the /effect command.

### CONDUIT

public static final EntityPotionEffectEvent.Cause CONDUIT
When the entity gets the effect from a conduit.

### CONVERSION

public static final EntityPotionEffectEvent.Cause CONVERSION
When a conversion from a villager zombie to a villager is started or finished.

### DEATH

public static final EntityPotionEffectEvent.Cause DEATH
When all effects are removed due to death (Note: This is called on respawn, so it's player only!)

### DOLPHIN

public static final EntityPotionEffectEvent.Cause DOLPHIN
When the entity gets the effect from a dolphin.

### EXPIRATION

public static final EntityPotionEffectEvent.Cause EXPIRATION
When the effect was removed due to expiration.

### FOOD

public static final EntityPotionEffectEvent.Cause FOOD
When an effect is inflicted due to food (e.g. when a player eats or a cookie is given to a parrot).

### ILLUSION

public static final EntityPotionEffectEvent.Cause ILLUSION
When an illusion illager makes himself disappear.

### MILK

public static final EntityPotionEffectEvent.Cause MILK
When all effects are removed due to a bucket of milk.

### PATROL_CAPTAIN

public static final EntityPotionEffectEvent.Cause PATROL_CAPTAIN
When a player gets bad omen after killing a patrol captain.

### PLUGIN

public static final EntityPotionEffectEvent.Cause PLUGIN
When a potion effect is modified through the plugin methods.

### POTION_DRINK

public static final EntityPotionEffectEvent.Cause POTION_DRINK
When the entity drinks a potion.

### POTION_SPLASH

public static final EntityPotionEffectEvent.Cause POTION_SPLASH
When the entity is inflicted with an effect due to a splash potion.

### SPIDER_SPAWN

public static final EntityPotionEffectEvent.Cause SPIDER_SPAWN
When a spider gets effects when spawning on hard difficulty.

### TOTEM

public static final EntityPotionEffectEvent.Cause TOTEM
When the entity gets effects from a totem item saving it's life.

### TURTLE_HELMET

public static final EntityPotionEffectEvent.Cause TURTLE_HELMET
When the entity gets water breathing by wearing a turtle helmet.

### UNKNOWN

public static final EntityPotionEffectEvent.Cause UNKNOWN
When the Cause is missing.

### VILLAGER_TRADE

public static final EntityPotionEffectEvent.Cause VILLAGER_TRADE
When a villager gets regeneration after a trade.

### WITHER_ROSE

public static final EntityPotionEffectEvent.Cause WITHER_ROSE
When an entity comes in contact with a wither rose.

## Method Details

### values

public static EntityPotionEffectEvent.Cause[] values()
Returns an array containing the constants of this enum class, in the order they are declared.

Returns:
  an array containing the constants of this enum class, in the order they are declared

### valueOf

public static EntityPotionEffectEvent.Cause valueOf(String name)
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)

Parameters:
  `name` - the name of the enum constant to be returned.
Returns:
  the enum constant with the specified name
Throws:
  `IllegalArgumentException` - if this enum class has no constant with the specified name
  `NullPointerException` - if the argument is null