Enum Class EntityType

java.lang.Object
java.lang.Enum<EntityType>
org.bukkit.entity.EntityType
All Implemented Interfaces:
FeatureDependant, Serializable, Comparable<EntityType>, Constable, Keyed, Translatable, Keyed, Translatable

public enum EntityType extends Enum<EntityType> implements Keyed, Translatable, Translatable, FeatureDependant
Since:
1.1.0
  • Enum Constant Details

    • ACACIA_BOAT

      public static final EntityType ACACIA_BOAT
      Since:
      1.21.3
    • ACACIA_CHEST_BOAT

      public static final EntityType ACACIA_CHEST_BOAT
      Since:
      1.21.3
    • ALLAY

      public static final EntityType ALLAY
      Since:
      1.19
    • AREA_EFFECT_CLOUD

      public static final EntityType AREA_EFFECT_CLOUD
      Since:
      1.9.4
    • ARMADILLO

      public static final EntityType ARMADILLO
      Since:
      1.20.6
    • ARMOR_STAND

      public static final EntityType ARMOR_STAND
      Since:
      1.8
    • ARROW

      public static final EntityType ARROW
      Since:
      1.1.0
    • AXOLOTL

      public static final EntityType AXOLOTL
      Since:
      1.17
    • BAMBOO_CHEST_RAFT

      public static final EntityType BAMBOO_CHEST_RAFT
      Since:
      1.21.3
    • BAMBOO_RAFT

      public static final EntityType BAMBOO_RAFT
      Since:
      1.21.3
    • BAT

      public static final EntityType BAT
      Since:
      1.4.5
    • BEE

      public static final EntityType BEE
      Since:
      1.15
    • BIRCH_BOAT

      public static final EntityType BIRCH_BOAT
      Since:
      1.21.3
    • BIRCH_CHEST_BOAT

      public static final EntityType BIRCH_CHEST_BOAT
      Since:
      1.21.3
    • BLAZE

      public static final EntityType BLAZE
      Since:
      1.1.0
    • BLOCK_DISPLAY

      public static final EntityType BLOCK_DISPLAY
      Since:
      1.19.4
    • BOGGED

      public static final EntityType BOGGED
      Since:
      1.20.6
    • BREEZE

      public static final EntityType BREEZE
      Since:
      1.20.4
    • BREEZE_WIND_CHARGE

      public static final EntityType BREEZE_WIND_CHARGE
      Since:
      1.20.6
    • CAMEL

      public static final EntityType CAMEL
      Since:
      1.19.3
    • CAMEL_HUSK

      public static final EntityType CAMEL_HUSK
      Since:
      1.21.11
    • CAT

      public static final EntityType CAT
      Since:
      1.14
    • CAVE_SPIDER

      public static final EntityType CAVE_SPIDER
      Since:
      1.1.0
    • CHERRY_BOAT

      public static final EntityType CHERRY_BOAT
      Since:
      1.21.3
    • CHERRY_CHEST_BOAT

      public static final EntityType CHERRY_CHEST_BOAT
      Since:
      1.21.3
    • CHEST_MINECART

      public static final EntityType CHEST_MINECART
      Since:
      1.20.6
    • CHICKEN

      public static final EntityType CHICKEN
      Since:
      1.1.0
    • COD

      public static final EntityType COD
      Since:
      1.13
    • COMMAND_BLOCK_MINECART

      public static final EntityType COMMAND_BLOCK_MINECART
      Since:
      1.20.6
    • COPPER_GOLEM

      public static final EntityType COPPER_GOLEM
      Since:
      1.21.10
    • COW

      public static final EntityType COW
      Since:
      1.1.0
    • CREAKING

      public static final EntityType CREAKING
      Since:
      1.21.3
    • CREEPER

      public static final EntityType CREEPER
      Since:
      1.1.0
    • DARK_OAK_BOAT

      public static final EntityType DARK_OAK_BOAT
      Since:
      1.21.3
    • DARK_OAK_CHEST_BOAT

      public static final EntityType DARK_OAK_CHEST_BOAT
      Since:
      1.21.3
    • DOLPHIN

      public static final EntityType DOLPHIN
      Since:
      1.13
    • DONKEY

      public static final EntityType DONKEY
      Since:
      1.11
    • DRAGON_FIREBALL

      public static final EntityType DRAGON_FIREBALL
      Since:
      1.9.4
    • DROWNED

      public static final EntityType DROWNED
      Since:
      1.13
    • EGG

      public static final EntityType EGG
      Since:
      1.1.0
    • ELDER_GUARDIAN

      public static final EntityType ELDER_GUARDIAN
      Since:
      1.11
    • END_CRYSTAL

      public static final EntityType END_CRYSTAL
      Since:
      1.20.6
    • ENDER_DRAGON

      public static final EntityType ENDER_DRAGON
      Since:
      1.1.0
    • ENDER_PEARL

      public static final EntityType ENDER_PEARL
      Since:
      1.1.0
    • ENDERMAN

      public static final EntityType ENDERMAN
      Since:
      1.1.0
    • ENDERMITE

      public static final EntityType ENDERMITE
      Since:
      1.8
    • EVOKER

      public static final EntityType EVOKER
      Since:
      1.11
    • EVOKER_FANGS

      public static final EntityType EVOKER_FANGS
      Since:
      1.11
    • EXPERIENCE_BOTTLE

      public static final EntityType EXPERIENCE_BOTTLE
      Since:
      1.20.6
    • EXPERIENCE_ORB

      public static final EntityType EXPERIENCE_ORB
      Since:
      1.1.0
    • EYE_OF_ENDER

      public static final EntityType EYE_OF_ENDER
      Since:
      1.20.6
    • FALLING_BLOCK

      public static final EntityType FALLING_BLOCK
      Since:
      1.1.0
    • FIREBALL

      public static final EntityType FIREBALL
      Since:
      1.1.0
    • FIREWORK_ROCKET

      public static final EntityType FIREWORK_ROCKET
      Since:
      1.20.6
    • FISHING_BOBBER

      public static final EntityType FISHING_BOBBER
      Since:
      1.20.6
    • FOX

      public static final EntityType FOX
      Since:
      1.14
    • FROG

      public static final EntityType FROG
      Since:
      1.19
    • FURNACE_MINECART

      public static final EntityType FURNACE_MINECART
      Since:
      1.20.6
    • GHAST

      public static final EntityType GHAST
      Since:
      1.1.0
    • GIANT

      public static final EntityType GIANT
      Since:
      1.1.0
    • GLOW_ITEM_FRAME

      public static final EntityType GLOW_ITEM_FRAME
      Since:
      1.17
    • GLOW_SQUID

      public static final EntityType GLOW_SQUID
      Since:
      1.17
    • GOAT

      public static final EntityType GOAT
      Since:
      1.17
    • GUARDIAN

      public static final EntityType GUARDIAN
      Since:
      1.8
    • HAPPY_GHAST

      public static final EntityType HAPPY_GHAST
      Since:
      1.21.6
    • HOGLIN

      public static final EntityType HOGLIN
      Since:
      1.16.1
    • HOPPER_MINECART

      public static final EntityType HOPPER_MINECART
      Since:
      1.20.6
    • HORSE

      public static final EntityType HORSE
      Since:
      1.6.1
    • HUSK

      public static final EntityType HUSK
      Since:
      1.11
    • ILLUSIONER

      public static final EntityType ILLUSIONER
      Since:
      1.12
    • INTERACTION

      public static final EntityType INTERACTION
      Since:
      1.19.4
    • IRON_GOLEM

      public static final EntityType IRON_GOLEM
      Since:
      1.2.2
    • ITEM

      public static final EntityType ITEM
      Since:
      1.20.6
    • ITEM_DISPLAY

      public static final EntityType ITEM_DISPLAY
      Since:
      1.19.4
    • ITEM_FRAME

      public static final EntityType ITEM_FRAME
      Since:
      1.4.5
    • JUNGLE_BOAT

      public static final EntityType JUNGLE_BOAT
      Since:
      1.21.3
    • JUNGLE_CHEST_BOAT

      public static final EntityType JUNGLE_CHEST_BOAT
      Since:
      1.21.3
    • LEASH_KNOT

      public static final EntityType LEASH_KNOT
      Since:
      1.20.6
    • LIGHTNING_BOLT

      public static final EntityType LIGHTNING_BOLT
      Since:
      1.20.6
    • LINGERING_POTION

      public static final EntityType LINGERING_POTION
      Since:
      1.9.4
    • LLAMA

      public static final EntityType LLAMA
      Since:
      1.11
    • LLAMA_SPIT

      public static final EntityType LLAMA_SPIT
      Since:
      1.11
    • MAGMA_CUBE

      public static final EntityType MAGMA_CUBE
      Since:
      1.1.0
    • MANGROVE_BOAT

      public static final EntityType MANGROVE_BOAT
      Since:
      1.21.3
    • MANGROVE_CHEST_BOAT

      public static final EntityType MANGROVE_CHEST_BOAT
      Since:
      1.21.3
    • MANNEQUIN

      public static final EntityType MANNEQUIN
      Since:
      1.21.10
    • MARKER

      public static final EntityType MARKER
      Since:
      1.17
    • MINECART

      public static final EntityType MINECART
      Since:
      1.1.0
    • MOOSHROOM

      public static final EntityType MOOSHROOM
      Since:
      1.20.6
    • MULE

      public static final EntityType MULE
      Since:
      1.11
    • NAUTILUS

      public static final EntityType NAUTILUS
      Since:
      1.21.11
    • OAK_BOAT

      public static final EntityType OAK_BOAT
      Since:
      1.21.3
    • OAK_CHEST_BOAT

      public static final EntityType OAK_CHEST_BOAT
      Since:
      1.21.3
    • OCELOT

      public static final EntityType OCELOT
      Since:
      1.2.2
    • OMINOUS_ITEM_SPAWNER

      public static final EntityType OMINOUS_ITEM_SPAWNER
      Since:
      1.20.6
    • PAINTING

      public static final EntityType PAINTING
      Since:
      1.1.0
    • PALE_OAK_BOAT

      public static final EntityType PALE_OAK_BOAT
      Since:
      1.21.3
    • PALE_OAK_CHEST_BOAT

      public static final EntityType PALE_OAK_CHEST_BOAT
      Since:
      1.21.3
    • PANDA

      public static final EntityType PANDA
      Since:
      1.14
    • PARCHED

      public static final EntityType PARCHED
      Since:
      1.21.11
    • PARROT

      public static final EntityType PARROT
      Since:
      1.12
    • PHANTOM

      public static final EntityType PHANTOM
      Since:
      1.13
    • PIG

      public static final EntityType PIG
      Since:
      1.1.0
    • PIGLIN

      public static final EntityType PIGLIN
      Since:
      1.16.1
    • PIGLIN_BRUTE

      public static final EntityType PIGLIN_BRUTE
      Since:
      1.16.2
    • PILLAGER

      public static final EntityType PILLAGER
      Since:
      1.14
    • PLAYER

      public static final EntityType PLAYER
      Since:
      1.1.0
    • POLAR_BEAR

      public static final EntityType POLAR_BEAR
      Since:
      1.10.2
    • PUFFERFISH

      public static final EntityType PUFFERFISH
      Since:
      1.13
    • RABBIT

      public static final EntityType RABBIT
      Since:
      1.8
    • RAVAGER

      public static final EntityType RAVAGER
      Since:
      1.14
    • SALMON

      public static final EntityType SALMON
      Since:
      1.13
    • SHEEP

      public static final EntityType SHEEP
      Since:
      1.1.0
    • SHULKER

      public static final EntityType SHULKER
      Since:
      1.9.4
    • SHULKER_BULLET

      public static final EntityType SHULKER_BULLET
      Since:
      1.9.4
    • SILVERFISH

      public static final EntityType SILVERFISH
      Since:
      1.1.0
    • SKELETON

      public static final EntityType SKELETON
      Since:
      1.1.0
    • SKELETON_HORSE

      public static final EntityType SKELETON_HORSE
      Since:
      1.11
    • SLIME

      public static final EntityType SLIME
      Since:
      1.1.0
    • SMALL_FIREBALL

      public static final EntityType SMALL_FIREBALL
      Since:
      1.1.0
    • SNIFFER

      public static final EntityType SNIFFER
      Since:
      1.19.4
    • SNOW_GOLEM

      public static final EntityType SNOW_GOLEM
      Since:
      1.20.6
    • SNOWBALL

      public static final EntityType SNOWBALL
      Since:
      1.1.0
    • SPAWNER_MINECART

      public static final EntityType SPAWNER_MINECART
      Since:
      1.20.6
    • SPECTRAL_ARROW

      public static final EntityType SPECTRAL_ARROW
      Since:
      1.9.4
    • SPIDER

      public static final EntityType SPIDER
      Since:
      1.1.0
    • SPLASH_POTION

      public static final EntityType SPLASH_POTION
      Since:
      1.1.0
    • SPRUCE_BOAT

      public static final EntityType SPRUCE_BOAT
      Since:
      1.21.3
    • SPRUCE_CHEST_BOAT

      public static final EntityType SPRUCE_CHEST_BOAT
      Since:
      1.21.3
    • SQUID

      public static final EntityType SQUID
      Since:
      1.1.0
    • STRAY

      public static final EntityType STRAY
      Since:
      1.11
    • STRIDER

      public static final EntityType STRIDER
      Since:
      1.16.1
    • TADPOLE

      public static final EntityType TADPOLE
      Since:
      1.19
    • TEXT_DISPLAY

      public static final EntityType TEXT_DISPLAY
      Since:
      1.19.4
    • TNT

      public static final EntityType TNT
      Since:
      1.20.6
    • TNT_MINECART

      public static final EntityType TNT_MINECART
      Since:
      1.20.6
    • TRADER_LLAMA

      public static final EntityType TRADER_LLAMA
      Since:
      1.14
    • TRIDENT

      public static final EntityType TRIDENT
      Since:
      1.13
    • TROPICAL_FISH

      public static final EntityType TROPICAL_FISH
      Since:
      1.13
    • TURTLE

      public static final EntityType TURTLE
      Since:
      1.13
    • VEX

      public static final EntityType VEX
      Since:
      1.11
    • VILLAGER

      public static final EntityType VILLAGER
      Since:
      1.1.0
    • VINDICATOR

      public static final EntityType VINDICATOR
      Since:
      1.11
    • WANDERING_TRADER

      public static final EntityType WANDERING_TRADER
      Since:
      1.14
    • WARDEN

      public static final EntityType WARDEN
      Since:
      1.19
    • WIND_CHARGE

      public static final EntityType WIND_CHARGE
      Since:
      1.20.4
    • WITCH

      public static final EntityType WITCH
      Since:
      1.4.5
    • WITHER

      public static final EntityType WITHER
      Since:
      1.4.5
    • WITHER_SKELETON

      public static final EntityType WITHER_SKELETON
      Since:
      1.11
    • WITHER_SKULL

      public static final EntityType WITHER_SKULL
      Since:
      1.4.5
    • WOLF

      public static final EntityType WOLF
      Since:
      1.1.0
    • ZOGLIN

      public static final EntityType ZOGLIN
      Since:
      1.16.1
    • ZOMBIE

      public static final EntityType ZOMBIE
      Since:
      1.1.0
    • ZOMBIE_HORSE

      public static final EntityType ZOMBIE_HORSE
      Since:
      1.11
    • ZOMBIE_NAUTILUS

      public static final EntityType ZOMBIE_NAUTILUS
      Since:
      1.21.11
    • ZOMBIE_VILLAGER

      public static final EntityType ZOMBIE_VILLAGER
      Since:
      1.11
    • ZOMBIFIED_PIGLIN

      public static final EntityType ZOMBIFIED_PIGLIN
      Since:
      1.16.1
    • UNKNOWN

      public static final EntityType UNKNOWN
      An unknown entity without an Entity Class
      Since:
      1.1.0
  • 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(since="1.6.2") @Nullable public @Nullable String getName()
      Deprecated.
      Magic value
      Gets the entity type name.
      Returns:
      the entity type's name
      Since:
      1.1.0
    • 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
      Since:
      1.14
    • getEntityClass

      @Nullable public @Nullable Class<? extends Entity> getEntityClass()
      Since:
      1.1.0
    • getTypeId

      @Deprecated(since="1.6.2", forRemoval=true) public short getTypeId()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Magic value
      Gets 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(since="1.6.2", forRemoval=true) @Nullable public static @Nullable EntityType fromId(int id)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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
      Since:
      1.1.0
    • isAlive

      public boolean isAlive()
      Since:
      1.1.0
    • getTranslationKey

      @NotNull @Deprecated(forRemoval=true) public @NotNull String 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 interface Translatable
      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)
      Since:
      1.17.1
    • hasDefaultAttributes

      public boolean hasDefaultAttributes()
      Checks if the entity has default attributes.
      Returns:
      true if it has default attributes
      Since:
      1.17.1
    • 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)
      Since:
      1.17.1