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_STANDARROWAn arrow projectile; may get stuck in the ground.BATBLAZEBOATA placed boat.CAVE_SPIDERCHICKENCOMPLEX_PARTCOWCREEPERDROPPED_ITEMAn item resting on the ground.EGGA flying chicken egg.ENDER_CRYSTALENDER_DRAGONENDER_PEARLA flying ender pearl.ENDER_SIGNALAn ender eye signal.ENDERMANENDERMITEEXPERIENCE_ORBAn experience orb.FALLING_BLOCKA block that is going to or is about to fall.FIREBALLA flying large fireball, as thrown by a Ghast for example.FIREWORKFISHING_HOOKA fishing line and bobber.GHASTGIANTGUARDIANHORSEIRON_GOLEMITEM_FRAMEAn item frame on a wall.LEASH_HITCHA leash attached to a fencepost.LIGHTNINGA bolt of lightning.MAGMA_CUBEMINECARTMINECART_CHESTMINECART_COMMANDMINECART_FURNACEMINECART_HOPPERMINECART_MOB_SPAWNERMINECART_TNTMUSHROOM_COWOCELOTPAINTINGA painting on a wall.PIGPIG_ZOMBIEPLAYERPRIMED_TNTPrimed TNT that is about to explode.RABBITSHEEPSILVERFISHSKELETONSLIMESMALL_FIREBALLA flying small fireball, such as thrown by a Blaze or player.SNOWBALLA flying snowball.SNOWMANSPIDERSPLASH_POTIONA flying splash potion.SQUIDTHROWN_EXP_BOTTLEA flying experience bottle.UNKNOWNAn unknown entity without an Entity ClassVILLAGERWEATHERWITCHWITHERWITHER_SKULLA flying wither skull projectile.WOLFZOMBIE -
Method Summary
Modifier and Type Method Description static EntityTypefromId(int id)Deprecated.Magic valuestatic EntityTypefromName(java.lang.String name)Deprecated.Magic valuejava.lang.Class<? extends Entity>getEntityClass()java.lang.StringgetName()Deprecated.Magic valueshortgetTypeId()Deprecated.Magic valuebooleanisAlive()booleanisSpawnable()Some entities cannot be spawned usingWorld.spawnEntity(Location, EntityType)orWorld.spawn(Location, Class), usually because they require additional information in order to spawn.static EntityTypevalueOf(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()
-