Package org.bukkit.entity

# Enum Class EntityType

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

All Implemented Interfaces:
  `Serializable`, `Comparable<EntityType>`, `Constable`, `Translatable`, `Keyed`

public enum EntityType extends Enum<EntityType> implements Keyed, Translatable

## 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`
`ARMOR_STAND`
Mechanical entity with an inventory for placing weapons / armor into.
`ARROW`
An arrow projectile; may get stuck in the ground.
`AXOLOTL`
`BAT`
`BEE`
`BLAZE`
`BOAT`
A placed boat.
`CAT`
`CAVE_SPIDER`
`CHICKEN`
`COD`
`COW`
`CREEPER`
`DOLPHIN`
`DONKEY`
`DRAGON_FIREBALL`
Like `FIREBALL` but with added effects.
`DROPPED_ITEM`
An item resting on the ground.
`DROWNED`
`EGG`
A flying chicken egg.
`ELDER_GUARDIAN`
`ENDER_CRYSTAL`
`ENDER_DRAGON`
`ENDER_PEARL`
A flying ender pearl.
`ENDER_SIGNAL`
An ender eye signal.
`ENDERMAN`
`ENDERMITE`
`EVOKER`
`EVOKER_FANGS`
`EXPERIENCE_ORB`
An experience orb.
`FALLING_BLOCK`
A block that is going to or is about to fall.
`FIREBALL`
A flying large fireball, as thrown by a Ghast for example.
`FIREWORK`
Internal representation of a Firework once it has been launched.
`FISHING_HOOK`
A fishing line and bobber.
`FOX`
`GHAST`
`GIANT`
`GLOW_ITEM_FRAME`
`GLOW_SQUID`
`GOAT`
`GUARDIAN`
`HOGLIN`
`HORSE`
`HUSK`
`ILLUSIONER`
`IRON_GOLEM`
`ITEM_FRAME`
An item frame on a wall.
`LEASH_HITCH`
A leash attached to a fencepost.
`LIGHTNING`
A bolt of lightning.
`LLAMA`
`LLAMA_SPIT`
`MAGMA_CUBE`
`MARKER`
`MINECART`
`MINECART_CHEST`
`MINECART_COMMAND`
`MINECART_FURNACE`
`MINECART_HOPPER`
`MINECART_MOB_SPAWNER`
`MINECART_TNT`
`MULE`
`MUSHROOM_COW`
`OCELOT`
`PAINTING`
A painting on a wall.
`PANDA`
`PARROT`
`PHANTOM`
`PIG`
`PIGLIN`
`PIGLIN_BRUTE`
`PILLAGER`
`PLAYER`
`POLAR_BEAR`
`PRIMED_TNT`
Primed TNT that is about to explode.
`PUFFERFISH`
`RABBIT`
`RAVAGER`
`SALMON`
`SHEEP`
`SHULKER`
`SHULKER_BULLET`
Bullet fired by `SHULKER`.
`SILVERFISH`
`SKELETON`
`SKELETON_HORSE`
`SLIME`
`SMALL_FIREBALL`
A flying small fireball, such as thrown by a Blaze or player.
`SNOWBALL`
A flying snowball.
`SNOWMAN`
`SPECTRAL_ARROW`
Like `ARROW` but causes the `PotionEffectType.GLOWING` effect on all team members.
`SPIDER`
`SPLASH_POTION`
A flying splash potion.
`SQUID`
`STRAY`
`STRIDER`
`THROWN_EXP_BOTTLE`
A flying experience bottle.
`TRADER_LLAMA`
`TRIDENT`
`TROPICAL_FISH`
`TURTLE`
`UNKNOWN`
An unknown entity without an Entity Class
`VEX`
`VILLAGER`
`VINDICATOR`
`WANDERING_TRADER`
`WITCH`
`WITHER`
`WITHER_SKELETON`
`WITHER_SKULL`
A flying wither skull projectile.
`WOLF`
`ZOGLIN`
`ZOMBIE`
`ZOMBIE_HORSE`
`ZOMBIE_VILLAGER`
`ZOMBIFIED_PIGLIN`

## Method Summary

Modifier and Type
Method
Description
`static @Nullable EntityType`
`fromId(int id)`
Deprecated.
Magic value
`static @Nullable EntityType`
`fromName(@Nullable String name)`
Deprecated.
Magic value
`Attributable`
`getDefaultAttributes()`
Gets the default attributes for the entity.
`@Nullable Class<? extends Entity>`
`getEntityClass()`
`@NotNull NamespacedKey`
`getKey()`
Return the namespaced identifier for this object.
`@Nullable String`
`getName()`
Deprecated.
Magic value
`@Nullable String`
`getTranslationKey()`
Deprecated.
use `translationKey()`
`short`
`getTypeId()`
Deprecated.
Magic value
`boolean`
`hasDefaultAttributes()`
Checks if the entity has default attributes.
`boolean`
`isAlive()`
`boolean`
`isSpawnable()`
Some entities cannot be spawned using `RegionAccessor.spawnEntity(Location, EntityType)` or `RegionAccessor.spawn(Location, Class)`, usually because they require additional information in order to spawn.
`@NotNull String`
`translationKey()`
Gets the translation key.
`static EntityType`
`valueOf(String name)`
Returns the enum constant of this class with the specified name.
`static EntityType[]`
`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

### DROPPED_ITEM

public static final EntityType DROPPED_ITEM
An item resting on the ground.

Spawn with `World.dropItem(Location, ItemStack)` or `World.dropItemNaturally(Location, ItemStack)`

### EXPERIENCE_ORB

public static final EntityType EXPERIENCE_ORB
An experience orb.

### AREA_EFFECT_CLOUD

public static final EntityType AREA_EFFECT_CLOUD

See Also:
  - `AreaEffectCloud`

### ELDER_GUARDIAN

public static final EntityType ELDER_GUARDIAN

See Also:
  - `ElderGuardian`

### WITHER_SKELETON

public static final EntityType WITHER_SKELETON

See Also:
  - `WitherSkeleton`

### STRAY

public static final EntityType STRAY

See Also:
  - `Stray`

### EGG

public static final EntityType EGG
A flying chicken egg.

### LEASH_HITCH

public static final EntityType LEASH_HITCH
A leash attached to a fencepost.

### PAINTING

public static final EntityType PAINTING
A painting on a wall.

### ARROW

public static final EntityType ARROW
An arrow projectile; may get stuck in the ground.

### SNOWBALL

public static final EntityType SNOWBALL
A flying snowball.

### FIREBALL

public static final EntityType FIREBALL
A flying large fireball, as thrown by a Ghast for example.

### SMALL_FIREBALL

public static final EntityType SMALL_FIREBALL
A flying small fireball, such as thrown by a Blaze or player.

### ENDER_PEARL

public static final EntityType ENDER_PEARL
A flying ender pearl.

### ENDER_SIGNAL

public static final EntityType ENDER_SIGNAL
An ender eye signal.

### SPLASH_POTION

public static final EntityType SPLASH_POTION
A flying splash potion.

### THROWN_EXP_BOTTLE

public static final EntityType THROWN_EXP_BOTTLE
A flying experience bottle.

### ITEM_FRAME

public static final EntityType ITEM_FRAME
An item frame on a wall.

### WITHER_SKULL

public static final EntityType WITHER_SKULL
A flying wither skull projectile.

### PRIMED_TNT

public static final EntityType PRIMED_TNT
Primed TNT that is about to explode.

### FALLING_BLOCK

public static final EntityType FALLING_BLOCK
A block that is going to or is about to fall.

### FIREWORK

public static final EntityType FIREWORK
Internal representation of a Firework once it has been launched.

### HUSK

public static final EntityType HUSK

See Also:
  - `Husk`

### SPECTRAL_ARROW

public static final EntityType SPECTRAL_ARROW
Like `ARROW` but causes the `PotionEffectType.GLOWING` effect on all team members.

### SHULKER_BULLET

public static final EntityType SHULKER_BULLET
Bullet fired by `SHULKER`.

### DRAGON_FIREBALL

public static final EntityType DRAGON_FIREBALL
Like `FIREBALL` but with added effects.

### ZOMBIE_VILLAGER

public static final EntityType ZOMBIE_VILLAGER

See Also:
  - `ZombieVillager`

### SKELETON_HORSE

public static final EntityType SKELETON_HORSE

See Also:
  - `SkeletonHorse`

### ZOMBIE_HORSE

public static final EntityType ZOMBIE_HORSE

See Also:
  - `ZombieHorse`

### ARMOR_STAND

public static final EntityType ARMOR_STAND
Mechanical entity with an inventory for placing weapons / armor into.

### DONKEY

public static final EntityType DONKEY

See Also:
  - `Donkey`

### MULE

public static final EntityType MULE

See Also:
  - `Mule`

### EVOKER_FANGS

public static final EntityType EVOKER_FANGS

See Also:
  - `EvokerFangs`

### EVOKER

public static final EntityType EVOKER

See Also:
  - `Evoker`

### VEX

public static final EntityType VEX

See Also:
  - `Vex`

### VINDICATOR

public static final EntityType VINDICATOR

See Also:
  - `Vindicator`

### ILLUSIONER

public static final EntityType ILLUSIONER

See Also:
  - `Illusioner`

### MINECART_COMMAND

public static final EntityType MINECART_COMMAND

See Also:
  - `CommandMinecart`

### BOAT

public static final EntityType BOAT
A placed boat.

### MINECART

public static final EntityType MINECART

See Also:
  - `RideableMinecart`

### MINECART_CHEST

public static final EntityType MINECART_CHEST

See Also:
  - `StorageMinecart`

### MINECART_FURNACE

public static final EntityType MINECART_FURNACE

See Also:
  - `PoweredMinecart`

### MINECART_TNT

public static final EntityType MINECART_TNT

See Also:
  - `ExplosiveMinecart`

### MINECART_HOPPER

public static final EntityType MINECART_HOPPER

See Also:
  - `HopperMinecart`

### MINECART_MOB_SPAWNER

public static final EntityType MINECART_MOB_SPAWNER

See Also:
  - `SpawnerMinecart`

### CREEPER

public static final EntityType CREEPER

### SKELETON

public static final EntityType SKELETON

### SPIDER

public static final EntityType SPIDER

### GIANT

public static final EntityType GIANT

### ZOMBIE

public static final EntityType ZOMBIE

### SLIME

public static final EntityType SLIME

### GHAST

public static final EntityType GHAST

### ZOMBIFIED_PIGLIN

public static final EntityType ZOMBIFIED_PIGLIN

### ENDERMAN

public static final EntityType ENDERMAN

### CAVE_SPIDER

public static final EntityType CAVE_SPIDER

### SILVERFISH

public static final EntityType SILVERFISH

### BLAZE

public static final EntityType BLAZE

### MAGMA_CUBE

public static final EntityType MAGMA_CUBE

### ENDER_DRAGON

public static final EntityType ENDER_DRAGON

### WITHER

public static final EntityType WITHER

### BAT

public static final EntityType BAT

### WITCH

public static final EntityType WITCH

### ENDERMITE

public static final EntityType ENDERMITE

### GUARDIAN

public static final EntityType GUARDIAN

### SHULKER

public static final EntityType SHULKER

### PIG

public static final EntityType PIG

### SHEEP

public static final EntityType SHEEP

### COW

public static final EntityType COW

### CHICKEN

public static final EntityType CHICKEN

### SQUID

public static final EntityType SQUID

### WOLF

public static final EntityType WOLF

### MUSHROOM_COW

public static final EntityType MUSHROOM_COW

### SNOWMAN

public static final EntityType SNOWMAN

### OCELOT

public static final EntityType OCELOT

### IRON_GOLEM

public static final EntityType IRON_GOLEM

### HORSE

public static final EntityType HORSE

### RABBIT

public static final EntityType RABBIT

### POLAR_BEAR

public static final EntityType POLAR_BEAR

### LLAMA

public static final EntityType LLAMA

### LLAMA_SPIT

public static final EntityType LLAMA_SPIT

### PARROT

public static final EntityType PARROT

### VILLAGER

public static final EntityType VILLAGER

### ENDER_CRYSTAL

public static final EntityType ENDER_CRYSTAL

### TURTLE

public static final EntityType TURTLE

### PHANTOM

public static final EntityType PHANTOM

### TRIDENT

public static final EntityType TRIDENT

### COD

public static final EntityType COD

### SALMON

public static final EntityType SALMON

### PUFFERFISH

public static final EntityType PUFFERFISH

### TROPICAL_FISH

public static final EntityType TROPICAL_FISH

### DROWNED

public static final EntityType DROWNED

### DOLPHIN

public static final EntityType DOLPHIN

### CAT

public static final EntityType CAT

### PANDA

public static final EntityType PANDA

### PILLAGER

public static final EntityType PILLAGER

### RAVAGER

public static final EntityType RAVAGER

### TRADER_LLAMA

public static final EntityType TRADER_LLAMA

### WANDERING_TRADER

public static final EntityType WANDERING_TRADER

### FOX

public static final EntityType FOX

### BEE

public static final EntityType BEE

### HOGLIN

public static final EntityType HOGLIN

### PIGLIN

public static final EntityType PIGLIN

### STRIDER

public static final EntityType STRIDER

### ZOGLIN

public static final EntityType ZOGLIN

### PIGLIN_BRUTE

public static final EntityType PIGLIN_BRUTE

### AXOLOTL

public static final EntityType AXOLOTL

### GLOW_ITEM_FRAME

public static final EntityType GLOW_ITEM_FRAME

### GLOW_SQUID

public static final EntityType GLOW_SQUID

### GOAT

public static final EntityType GOAT

### MARKER

public static final EntityType MARKER

### FISHING_HOOK

public static final EntityType FISHING_HOOK
A fishing line and bobber.

### LIGHTNING

public static final EntityType LIGHTNING
A bolt of lightning.

Spawn with `World.strikeLightning(Location)`.

### PLAYER

public static final EntityType PLAYER

### UNKNOWN

public static final EntityType UNKNOWN
An unknown entity without an Entity Class

## Method Details

### values

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

### getName

@Deprecated @Nullable public @Nullable String getName()
Deprecated.
Magic value
Gets the entity type name.

Returns:
  the entity type's name

### getKey

@NotNull public @NotNull NamespacedKey getKey()
Description copied from interface: `Keyed`
Return the namespaced identifier for this object.

Specified by:
  `getKey` in interface `Keyed`
Returns:
  this object's key

### getEntityClass

@Nullable public @Nullable Class<? extends Entity> getEntityClass()

### getTypeId

@Deprecated public short getTypeId()
Deprecated.
Magic value
Gets the entity type id.

Returns:
  the raw type id

### fromName

@Deprecated @Contract("null -> null") @Nullable public static @Nullable EntityType fromName(@Nullable @Nullable String name)
Deprecated.
Magic value
Gets an entity type from its name.

Parameters:
  `name` - the entity type's name
Returns:
  the matching entity type or null

### fromId

@Deprecated @Nullable public static @Nullable EntityType fromId(int id)
Deprecated.
Magic value
Gets an entity from its id.

Parameters:
  `id` - the raw type id
Returns:
  the matching entity type or null

### isSpawnable

public boolean isSpawnable()
Some entities cannot be spawned using `RegionAccessor.spawnEntity(Location, EntityType)` or `RegionAccessor.spawn(Location, Class)`, usually because they require additional information in order to spawn.

Returns:
  False if the entity type cannot be spawned

### isAlive

public boolean isAlive()

### getTranslationKey

@Deprecated @Nullable public @Nullable String getTranslationKey()
Deprecated.
use `translationKey()`
Return the translation key for the EntityType, so the client can translate it into the active locale when using a TranslatableComponent.
This is `null`, when the EntityType isn't known to NMS (custom entities)

Returns:
  the translation key

### translationKey

@NotNull public @NotNull String translationKey()
Description copied from interface: `net.kyori.adventure.translation.Translatable`
Gets the translation key.

Specified by:
  `translationKey` in interface `Translatable`
Returns:
  the translation key
Throws:
  `IllegalArgumentException` - if the entity does not have a translation key (is probably a custom entity)

### hasDefaultAttributes

public boolean hasDefaultAttributes()
Checks if the entity has default attributes.

Returns:
  true if it has default attributes

### getDefaultAttributes

@NotNull public Attributable getDefaultAttributes()
Gets the default attributes for the entity.

Returns:
  an unmodifiable instance of Attributable for reading default attributes.
Throws:
  `IllegalArgumentException` - if the entity does not exist of have default attributes (use `hasDefaultAttributes()` first)