Package org.bukkit.entity

# Enum Class EntityCategory

java.lang.Object
java.lang.Enum<EntityCategory>
org.bukkit.entity.EntityCategory

All Implemented Interfaces:
  `Serializable`, `Comparable<EntityCategory>`, `Constable`

public enum EntityCategory extends Enum<EntityCategory>
A classification of entities which may behave differently than others or be affected uniquely by enchantments and potion effects among other things.

## 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
`ARTHROPOD`
Entities of the arthropod family.
`ILLAGER`
Entities that participate in raids.
`NONE`
Any uncategorized entity.
`UNDEAD`
Undead creatures.
`WATER`
Entities that reside primarily underwater (excluding `Drowned`).

## Method Summary

Modifier and Type
Method
Description
`static EntityCategory`
`valueOf(String name)`
Returns the enum constant of this class with the specified name.
`static EntityCategory[]`
`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

### NONE

public static final EntityCategory NONE
Any uncategorized entity. No additional effects are applied to these entities relating to a categorization.

### UNDEAD

public static final EntityCategory UNDEAD
Undead creatures. These creatures:

- Are damaged by potions of healing.
- Are healed by potions of harming.
- Are immune to drowning and poison.
- Are subject to burning in daylight (though not all).
- Sink in water (except `Drowned`, `Phantoms` and `Withers`).
- Take additional damage from `Enchantment.DAMAGE_UNDEAD`.
- Are ignored by `Withers`.

### ARTHROPOD

public static final EntityCategory ARTHROPOD
Entities of the arthropod family. These creatures:

- Take additional damage and receive `PotionEffectType.SLOW` from `Enchantment.DAMAGE_ARTHROPODS`.
- Are immune to `PotionEffectType.POISON` if they are spiders.

### ILLAGER

public static final EntityCategory ILLAGER
Entities that participate in raids. These creatures:

- Are immune to damage from `EvokerFangs`.
- Are ignored by `vindicators` named "Johnny".
- Are hostile to `villagers`, `wandering traders`, `iron golems` and `players`.

### WATER

public static final EntityCategory WATER
Entities that reside primarily underwater (excluding `Drowned`). These creatures:

- Take additional damage from `Enchantment.IMPALING`.
- Are immune to drowning (excluding `dolphins`).
- Take suffocation damage when out of water for extended periods of time (excluding `guardians` and `turtles`).
- Are capable of swimming in water rather than floating or sinking.

## Method Details

### values

public static EntityCategory[] 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 EntityCategory 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