Package org.bukkit.entity
Enum Class EntityType
- All Implemented Interfaces:
- Serializable,- Comparable<EntityType>,- Constable,- Keyed,- RegistryAware,- Translatable
- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum ConstantsEnum ConstantDescriptionMechanical entity with an inventory for placing weapons / armor into.An arrow projectile; may get stuck in the ground.LikeFIREBALLbut with added effects.A flying chicken egg.A flying ender pearl.A flying experience bottle.An experience orb.An ender eye signal.A block that is going to or is about to fall.A flying large fireball, as thrown by a Ghast for example.Internal representation of a Firework once it has been launched.A fishing line and bobber.An item resting on the ground.An item frame on a wall.A leash attached to a fencepost.A bolt of lightning.A painting on a wall.A flying splash potion.Bullet fired bySHULKER.A flying small fireball, such as thrown by a Blaze or player.A flying snowball.LikeARROWbut causes thePotionEffectType.GLOWINGeffect on all team members.Primed TNT that is about to explode.An unknown entity without an Entity ClassA flying wither skull projectile.
- 
Method SummaryModifier and TypeMethodDescriptionstatic EntityTypefromId(int id) Deprecated.Magic valuestatic EntityTypeDeprecated.Magic valuegetKey()Deprecated.A key might not always be present, usegetKeyOrThrow()instead.Gets the key of this instance if it is registered otherwise returnsnull.Gets the key of this instance if it is registered otherwise throws an error.getName()Deprecated.Magic valueGet the translation key, suitable for use in a translation component.shortDeprecated.Magic valuebooleanisAlive()booleanisEnabledByFeature(World world) Gets if this EntityType is enabled by feature in a world.booleanReturns whether this instance is register in a registry and therefore has a key or not.booleanSome entities cannot be spawned usingRegionAccessor.spawnEntity(Location, EntityType)orRegionAccessor.spawn(Location, Class), usually because they require additional information in order to spawn.static EntityTypeReturns 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.
- 
Enum Constant Details- 
ITEMAn item resting on the ground.Spawn with World.dropItem(Location, ItemStack)orWorld.dropItemNaturally(Location, ItemStack)
- 
EXPERIENCE_ORBAn experience orb.
- 
AREA_EFFECT_CLOUD- See Also:
 
- 
ELDER_GUARDIAN- See Also:
 
- 
WITHER_SKELETON- See Also:
 
- 
STRAY- See Also:
 
- 
EGGA flying chicken egg.
- 
LEASH_KNOTA leash attached to a fencepost.
- 
PAINTINGA painting on a wall.
- 
ARROWAn arrow projectile; may get stuck in the ground.
- 
SNOWBALLA flying snowball.
- 
FIREBALLA flying large fireball, as thrown by a Ghast for example.
- 
SMALL_FIREBALLA flying small fireball, such as thrown by a Blaze or player.
- 
ENDER_PEARLA flying ender pearl.
- 
EYE_OF_ENDERAn ender eye signal.
- 
POTIONA flying splash potion.
- 
EXPERIENCE_BOTTLEA flying experience bottle.
- 
ITEM_FRAMEAn item frame on a wall.
- 
WITHER_SKULLA flying wither skull projectile.
- 
TNTPrimed TNT that is about to explode.
- 
FALLING_BLOCKA block that is going to or is about to fall.
- 
FIREWORK_ROCKETInternal representation of a Firework once it has been launched.
- 
HUSK- See Also:
 
- 
SPECTRAL_ARROWLikeARROWbut causes thePotionEffectType.GLOWINGeffect on all team members.
- 
SHULKER_BULLETBullet fired bySHULKER.
- 
DRAGON_FIREBALLLikeFIREBALLbut with added effects.
- 
ZOMBIE_VILLAGER- See Also:
 
- 
SKELETON_HORSE- See Also:
 
- 
ZOMBIE_HORSE- See Also:
 
- 
ARMOR_STANDMechanical entity with an inventory for placing weapons / armor into.
- 
DONKEY- See Also:
 
- 
MULE- See Also:
 
- 
EVOKER_FANGS- See Also:
 
- 
EVOKER- See Also:
 
- 
VEX- See Also:
 
- 
VINDICATOR- See Also:
 
- 
ILLUSIONER- See Also:
 
- 
COMMAND_BLOCK_MINECART- See Also:
 
- 
MINECART- See Also:
 
- 
CHEST_MINECART- See Also:
 
- 
FURNACE_MINECART- See Also:
 
- 
TNT_MINECART- See Also:
 
- 
HOPPER_MINECART- See Also:
 
- 
SPAWNER_MINECART- See Also:
 
- 
CREEPER
- 
SKELETON
- 
SPIDER
- 
GIANT
- 
ZOMBIE
- 
SLIME
- 
GHAST
- 
ZOMBIFIED_PIGLIN
- 
ENDERMAN
-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OAK_CHEST_BOAT
- 
PALE_OAK_BOAT
- 
PALE_OAK_CHEST_BOAT
- 
SPRUCE_BOAT
- 
SPRUCE_CHEST_BOAT
- 
CREAKING
- 
FISHING_BOBBERA fishing line and bobber.
- 
LIGHTNING_BOLTA bolt of lightning.Spawn with World.strikeLightning(Location).
- 
PLAYER
- 
UNKNOWNAn unknown entity without an Entity Class
 
- 
- 
Method Details- 
valuesReturns 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
 
- 
valueOfReturns 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
 
- 
getNameDeprecated.Magic valueGets the entity type name.- Returns:
- the entity type's name
 
- 
getKeyDeprecated.A key might not always be present, usegetKeyOrThrow()instead.Return the namespaced identifier for this object.
- 
getEntityClass
- 
getTypeIdDeprecated.Magic valueGets the entity type id.- Returns:
- the raw type id
 
- 
fromName@Deprecated(since="1.6.2") @Contract("null -> null") @Nullable public static EntityType fromName(@Nullable String name) Deprecated.Magic valueGets an entity type from its name.- Parameters:
- name- the entity type's name
- Returns:
- the matching entity type or null
 
- 
fromIdDeprecated.Magic valueGets an entity from its id.- Parameters:
- id- the raw type id
- Returns:
- the matching entity type or null
 
- 
isSpawnablepublic boolean isSpawnable()Some entities cannot be spawned usingRegionAccessor.spawnEntity(Location, EntityType)orRegionAccessor.spawn(Location, Class), usually because they require additional information in order to spawn.- Returns:
- False if the entity type cannot be spawned
 
- 
isAlivepublic boolean isAlive()
- 
getTranslationKeyDescription copied from interface:TranslatableGet the translation key, suitable for use in a translation component.- Specified by:
- getTranslationKeyin interface- Translatable
- Returns:
- the translation key
 
- 
isEnabledByFeatureGets if this EntityType is enabled by feature in a world.- Parameters:
- world- the world to check
- Returns:
- true if this EntityType can be used to spawn an Entity for this World.
 
- 
getKeyOrThrowDescription copied from interface:RegistryAwareGets the key of this instance if it is registered otherwise throws an error.
 This is a convenience method and plugins should always checkRegistryAware.isRegistered()before using this method.- Specified by:
- getKeyOrThrowin interface- RegistryAware
- Returns:
- the key with which this instance is registered.
- See Also:
 
- 
getKeyOrNullDescription copied from interface:RegistryAwareGets the key of this instance if it is registered otherwise returnsnull.- Specified by:
- getKeyOrNullin interface- RegistryAware
- Returns:
- the key with which this instance is registered or nullif not registered.
- See Also:
 
- 
isRegisteredpublic boolean isRegistered()Description copied from interface:RegistryAwareReturns whether this instance is register in a registry and therefore has a key or not.- Specified by:
- isRegisteredin interface- RegistryAware
- Returns:
- true, if this instance is registered. Otherwise, false.
- See Also:
 
 
-