Package org.bukkit.entity
Enum EntityType
java.lang.Object
java.lang.Enum<EntityType>
org.bukkit.entity.EntityType
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<EntityType>
,java.lang.constant.Constable
public enum EntityType extends java.lang.Enum<EntityType>
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description ARMOR_STAND
ARROW
An arrow projectile; may get stuck in the ground.BAT
BLAZE
BOAT
A placed boat.CAVE_SPIDER
CHICKEN
COMPLEX_PART
COW
CREEPER
DROPPED_ITEM
An item resting on the ground.EGG
A flying chicken egg.ENDER_CRYSTAL
ENDER_DRAGON
ENDER_PEARL
A flying ender pearl.ENDER_SIGNAL
An ender eye signal.ENDERMAN
ENDERMITE
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
FISHING_HOOK
A fishing line and bobber.GHAST
GIANT
GUARDIAN
HORSE
IRON_GOLEM
ITEM_FRAME
An item frame on a wall.LEASH_HITCH
A leash attached to a fencepost.LIGHTNING
A bolt of lightning.MAGMA_CUBE
MINECART
MINECART_CHEST
MINECART_COMMAND
MINECART_FURNACE
MINECART_HOPPER
MINECART_MOB_SPAWNER
MINECART_TNT
MUSHROOM_COW
OCELOT
PAINTING
A painting on a wall.PIG
PIG_ZOMBIE
PLAYER
PRIMED_TNT
Primed TNT that is about to explode.RABBIT
SHEEP
SILVERFISH
SKELETON
SLIME
SMALL_FIREBALL
A flying small fireball, such as thrown by a Blaze or player.SNOWBALL
A flying snowball.SNOWMAN
SPIDER
SPLASH_POTION
A flying splash potion.SQUID
THROWN_EXP_BOTTLE
A flying experience bottle.UNKNOWN
An unknown entity without an Entity ClassVILLAGER
WEATHER
WITCH
WITHER
WITHER_SKULL
A flying wither skull projectile.WOLF
ZOMBIE
-
Method Summary
Modifier and Type Method Description static EntityType
fromId(int id)
Deprecated.Magic valuestatic EntityType
fromName(java.lang.String name)
Deprecated.Magic valuejava.lang.Class<? extends Entity>
getEntityClass()
java.lang.String
getName()
Deprecated.Magic valueshort
getTypeId()
Deprecated.Magic valueboolean
isAlive()
boolean
isSpawnable()
Some entities cannot be spawned usingWorld.spawnEntity(Location, EntityType)
orWorld.spawn(Location, Class)
, usually because they require additional information in order to spawn.static EntityType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static EntityType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
DROPPED_ITEM
An item resting on the ground.Spawn with
World.dropItem(Location, ItemStack)
orWorld.dropItemNaturally(Location, ItemStack)
-
EXPERIENCE_ORB
An experience orb. -
LEASH_HITCH
A leash attached to a fencepost. -
PAINTING
A painting on a wall. -
ARROW
An arrow projectile; may get stuck in the ground. -
SNOWBALL
A flying snowball. -
FIREBALL
A flying large fireball, as thrown by a Ghast for example. -
SMALL_FIREBALL
A flying small fireball, such as thrown by a Blaze or player. -
ENDER_PEARL
A flying ender pearl. -
ENDER_SIGNAL
An ender eye signal. -
THROWN_EXP_BOTTLE
A flying experience bottle. -
ITEM_FRAME
An item frame on a wall. -
WITHER_SKULL
A flying wither skull projectile. -
PRIMED_TNT
Primed TNT that is about to explode. -
FALLING_BLOCK
A block that is going to or is about to fall. -
FIREWORK
-
ARMOR_STAND
-
MINECART_COMMAND
- See Also:
CommandMinecart
-
BOAT
A placed boat. -
MINECART
- See Also:
RideableMinecart
-
MINECART_CHEST
- See Also:
StorageMinecart
-
MINECART_FURNACE
- See Also:
PoweredMinecart
-
MINECART_TNT
- See Also:
ExplosiveMinecart
-
MINECART_HOPPER
- See Also:
HopperMinecart
-
MINECART_MOB_SPAWNER
- See Also:
SpawnerMinecart
-
CREEPER
-
SKELETON
-
SPIDER
-
GIANT
-
ZOMBIE
-
SLIME
-
GHAST
-
PIG_ZOMBIE
-
ENDERMAN
-
CAVE_SPIDER
-
SILVERFISH
-
BLAZE
-
MAGMA_CUBE
-
ENDER_DRAGON
-
WITHER
-
BAT
-
WITCH
-
ENDERMITE
-
GUARDIAN
-
PIG
-
SHEEP
-
COW
-
CHICKEN
-
SQUID
-
WOLF
-
MUSHROOM_COW
-
SNOWMAN
-
OCELOT
-
IRON_GOLEM
-
HORSE
-
RABBIT
-
VILLAGER
-
ENDER_CRYSTAL
-
SPLASH_POTION
A flying splash potion. -
EGG
A flying chicken egg. -
FISHING_HOOK
A fishing line and bobber. -
LIGHTNING
A bolt of lightning.Spawn with
World.strikeLightning(Location)
. -
WEATHER
-
PLAYER
-
COMPLEX_PART
-
UNKNOWN
An unknown entity without an Entity Class
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getName
@Deprecated public java.lang.String getName()Deprecated.Magic value- Returns:
- the entity type's name
-
getEntityClass
-
getTypeId
@Deprecated public short getTypeId()Deprecated.Magic value- Returns:
- the raw type id
-
fromName
Deprecated.Magic value- Parameters:
name
- the entity type's name- Returns:
- the matching entity type or null
-
fromId
Deprecated.Magic value- Parameters:
id
- the raw type id- Returns:
- the matching entity type or null
-
isSpawnable
public boolean isSpawnable()Some entities cannot be spawned usingWorld.spawnEntity(Location, EntityType)
orWorld.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()
-