Package org.bukkit.entity
Enum Class EntityType
- All Implemented Interfaces:
FeatureDependant
,Serializable
,Comparable<EntityType>
,Constable
,Keyed
,Translatable
,Keyed
,Translatable
public enum EntityType
extends Enum<EntityType>
implements Keyed, Translatable, Translatable, FeatureDependant
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionMechanical entity with an inventory for placing weapons / armor into.An arrow projectile; may get stuck in the ground.A placed boat.LikeFIREBALL
but 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.LikeARROW
but causes thePotionEffectType.GLOWING
effect on all team members.Primed TNT that is about to explode.An unknown entity without an Entity ClassA flying wither skull projectile. -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable EntityType
fromId
(int id) Deprecated.Magic valuestatic @Nullable EntityType
Gets an entity type from its name.Gets the default attributes for the entity.getKey()
Return the namespaced identifier for this object.getName()
Deprecated.Magic valueDeprecated, for removal: This API element is subject to removal in a future version.short
Deprecated.Magic valueboolean
Checks if the entity has default attributes.boolean
isAlive()
boolean
isEnabledByFeature
(@NotNull World world) Deprecated, for removal: This API element is subject to removal in a future version.boolean
Some entities cannot be spawned usingRegionAccessor.spawnEntity(Location, EntityType)
orRegionAccessor.spawn(Location, Class)
, usually because they require additional information in order to spawn.Gets the translation key.static EntityType
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 interface io.papermc.paper.world.flag.FeatureDependant
requiredFeatures
-
Enum Constant Details
-
ITEM
An item resting on the ground.Spawn with
World.dropItem(Location, ItemStack)
orWorld.dropItemNaturally(Location, ItemStack)
-
EXPERIENCE_ORB
An experience orb. -
AREA_EFFECT_CLOUD
- See Also:
-
ELDER_GUARDIAN
- See Also:
-
WITHER_SKELETON
- See Also:
-
STRAY
- See Also:
-
EGG
A flying chicken egg. -
LEASH_KNOT
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. -
EYE_OF_ENDER
An ender eye signal. -
POTION
A flying splash potion. -
EXPERIENCE_BOTTLE
A flying experience bottle. -
ITEM_FRAME
An item frame on a wall. -
WITHER_SKULL
A flying wither skull projectile. -
TNT
Primed TNT that is about to explode. -
FALLING_BLOCK
A block that is going to or is about to fall. -
FIREWORK_ROCKET
Internal representation of a Firework once it has been launched. -
HUSK
- See Also:
-
SPECTRAL_ARROW
LikeARROW
but causes thePotionEffectType.GLOWING
effect on all team members. -
SHULKER_BULLET
Bullet fired bySHULKER
. -
DRAGON_FIREBALL
LikeFIREBALL
but with added effects. -
ZOMBIE_VILLAGER
- See Also:
-
SKELETON_HORSE
- See Also:
-
ZOMBIE_HORSE
- See Also:
-
ARMOR_STAND
Mechanical 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:
-
BOAT
A placed boat. -
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
-
CAVE_SPIDER
-
SILVERFISH
-
BLAZE
-
MAGMA_CUBE
-
ENDER_DRAGON
-
WITHER
-
BAT
-
WITCH
-
ENDERMITE
-
GUARDIAN
-
SHULKER
-
PIG
-
SHEEP
-
COW
-
CHICKEN
-
SQUID
-
WOLF
-
MOOSHROOM
-
SNOW_GOLEM
-
OCELOT
-
IRON_GOLEM
-
HORSE
-
RABBIT
-
POLAR_BEAR
-
LLAMA
-
LLAMA_SPIT
-
PARROT
-
VILLAGER
-
END_CRYSTAL
-
TURTLE
-
PHANTOM
-
TRIDENT
-
COD
-
SALMON
-
PUFFERFISH
-
TROPICAL_FISH
-
DROWNED
-
DOLPHIN
-
CAT
-
PANDA
-
PILLAGER
-
RAVAGER
-
TRADER_LLAMA
-
WANDERING_TRADER
-
FOX
-
BEE
-
HOGLIN
-
PIGLIN
-
STRIDER
-
ZOGLIN
-
PIGLIN_BRUTE
-
AXOLOTL
-
GLOW_ITEM_FRAME
-
GLOW_SQUID
-
GOAT
-
MARKER
-
ALLAY
-
CHEST_BOAT
-
FROG
-
TADPOLE
-
WARDEN
-
CAMEL
-
BLOCK_DISPLAY
-
INTERACTION
-
ITEM_DISPLAY
-
SNIFFER
-
TEXT_DISPLAY
-
BREEZE
-
WIND_CHARGE
-
BREEZE_WIND_CHARGE
-
ARMADILLO
-
BOGGED
-
OMINOUS_ITEM_SPAWNER
-
FISHING_BOBBER
A fishing line and bobber. -
LIGHTNING_BOLT
A bolt of lightning.Spawn with
World.strikeLightning(Location)
. -
PLAYER
-
UNKNOWN
An unknown entity without an Entity Class
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getName
Deprecated.Magic valueGets the entity type name.- Returns:
- the entity type's name
-
getKey
Description copied from interface:Keyed
Return the namespaced identifier for this object. -
getEntityClass
-
getTypeId
Deprecated.Magic valueGets the entity type id.- Returns:
- the raw type id
-
fromName
@Internal @Contract("null -> null") @Nullable public static @Nullable EntityType fromName(@Nullable @Nullable String name) Gets an entity type from its name.- Parameters:
name
- the entity type's name- Returns:
- the matching entity type or null
- API Note:
- Internal Use Only
-
fromId
Deprecated.Magic valueGets 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 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
-
isAlive
public boolean isAlive() -
getTranslationKey
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:Translatable
Get the translation key, suitable for use in a translation component.- Specified by:
getTranslationKey
in interfaceTranslatable
- Returns:
- the translation key
-
translationKey
Description copied from interface:net.kyori.adventure.translation.Translatable
Gets the translation key.- Specified by:
translationKey
in interfaceTranslatable
- 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
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 (usehasDefaultAttributes()
first)
-
isEnabledByFeature
@Deprecated(forRemoval=true, since="1.20") public boolean isEnabledByFeature(@NotNull @NotNull World world) Deprecated, for removal: This API element is subject to removal in a future version.Gets 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.
-