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
  • Enum Constant Details

    • ACACIA_BOAT

      public static final EntityType ACACIA_BOAT
    • ACACIA_CHEST_BOAT

      public static final EntityType ACACIA_CHEST_BOAT
    • ALLAY

      public static final EntityType ALLAY
    • AREA_EFFECT_CLOUD

      public static final EntityType AREA_EFFECT_CLOUD
    • ARMADILLO

      public static final EntityType ARMADILLO
    • ARMOR_STAND

      public static final EntityType ARMOR_STAND
    • ARROW

      public static final EntityType ARROW
    • AXOLOTL

      public static final EntityType AXOLOTL
    • BAMBOO_CHEST_RAFT

      public static final EntityType BAMBOO_CHEST_RAFT
    • BAMBOO_RAFT

      public static final EntityType BAMBOO_RAFT
    • BAT

      public static final EntityType BAT
    • BEE

      public static final EntityType BEE
    • BIRCH_BOAT

      public static final EntityType BIRCH_BOAT
    • BIRCH_CHEST_BOAT

      public static final EntityType BIRCH_CHEST_BOAT
    • BLAZE

      public static final EntityType BLAZE
    • BLOCK_DISPLAY

      public static final EntityType BLOCK_DISPLAY
    • BOGGED

      public static final EntityType BOGGED
    • BREEZE

      public static final EntityType BREEZE
    • BREEZE_WIND_CHARGE

      public static final EntityType BREEZE_WIND_CHARGE
    • CAMEL

      public static final EntityType CAMEL
    • CAT

      public static final EntityType CAT
    • CAVE_SPIDER

      public static final EntityType CAVE_SPIDER
    • CHERRY_BOAT

      public static final EntityType CHERRY_BOAT
    • CHERRY_CHEST_BOAT

      public static final EntityType CHERRY_CHEST_BOAT
    • CHEST_MINECART

      public static final EntityType CHEST_MINECART
    • CHICKEN

      public static final EntityType CHICKEN
    • COD

      public static final EntityType COD
    • COMMAND_BLOCK_MINECART

      public static final EntityType COMMAND_BLOCK_MINECART
    • COW

      public static final EntityType COW
    • CREAKING

      public static final EntityType CREAKING
    • CREEPER

      public static final EntityType CREEPER
    • DARK_OAK_BOAT

      public static final EntityType DARK_OAK_BOAT
    • DARK_OAK_CHEST_BOAT

      public static final EntityType DARK_OAK_CHEST_BOAT
    • DOLPHIN

      public static final EntityType DOLPHIN
    • DONKEY

      public static final EntityType DONKEY
    • DRAGON_FIREBALL

      public static final EntityType DRAGON_FIREBALL
    • DROWNED

      public static final EntityType DROWNED
    • EGG

      public static final EntityType EGG
    • ELDER_GUARDIAN

      public static final EntityType ELDER_GUARDIAN
    • END_CRYSTAL

      public static final EntityType END_CRYSTAL
    • ENDER_DRAGON

      public static final EntityType ENDER_DRAGON
    • ENDER_PEARL

      public static final EntityType ENDER_PEARL
    • ENDERMAN

      public static final EntityType ENDERMAN
    • ENDERMITE

      public static final EntityType ENDERMITE
    • EVOKER

      public static final EntityType EVOKER
    • EVOKER_FANGS

      public static final EntityType EVOKER_FANGS
    • EXPERIENCE_BOTTLE

      public static final EntityType EXPERIENCE_BOTTLE
    • EXPERIENCE_ORB

      public static final EntityType EXPERIENCE_ORB
    • EYE_OF_ENDER

      public static final EntityType EYE_OF_ENDER
    • FALLING_BLOCK

      public static final EntityType FALLING_BLOCK
    • FIREBALL

      public static final EntityType FIREBALL
    • FIREWORK_ROCKET

      public static final EntityType FIREWORK_ROCKET
    • FISHING_BOBBER

      public static final EntityType FISHING_BOBBER
    • FOX

      public static final EntityType FOX
    • FROG

      public static final EntityType FROG
    • FURNACE_MINECART

      public static final EntityType FURNACE_MINECART
    • GHAST

      public static final EntityType GHAST
    • GIANT

      public static final EntityType GIANT
    • GLOW_ITEM_FRAME

      public static final EntityType GLOW_ITEM_FRAME
    • GLOW_SQUID

      public static final EntityType GLOW_SQUID
    • GOAT

      public static final EntityType GOAT
    • GUARDIAN

      public static final EntityType GUARDIAN
    • HOGLIN

      public static final EntityType HOGLIN
    • HOPPER_MINECART

      public static final EntityType HOPPER_MINECART
    • HORSE

      public static final EntityType HORSE
    • HUSK

      public static final EntityType HUSK
    • ILLUSIONER

      public static final EntityType ILLUSIONER
    • INTERACTION

      public static final EntityType INTERACTION
    • IRON_GOLEM

      public static final EntityType IRON_GOLEM
    • ITEM

      public static final EntityType ITEM
    • ITEM_DISPLAY

      public static final EntityType ITEM_DISPLAY
    • ITEM_FRAME

      public static final EntityType ITEM_FRAME
    • JUNGLE_BOAT

      public static final EntityType JUNGLE_BOAT
    • JUNGLE_CHEST_BOAT

      public static final EntityType JUNGLE_CHEST_BOAT
    • LEASH_KNOT

      public static final EntityType LEASH_KNOT
    • LIGHTNING_BOLT

      public static final EntityType LIGHTNING_BOLT
    • LINGERING_POTION

      public static final EntityType LINGERING_POTION
    • LLAMA

      public static final EntityType LLAMA
    • LLAMA_SPIT

      public static final EntityType LLAMA_SPIT
    • MAGMA_CUBE

      public static final EntityType MAGMA_CUBE
    • MANGROVE_BOAT

      public static final EntityType MANGROVE_BOAT
    • MANGROVE_CHEST_BOAT

      public static final EntityType MANGROVE_CHEST_BOAT
    • MARKER

      public static final EntityType MARKER
    • MINECART

      public static final EntityType MINECART
    • MOOSHROOM

      public static final EntityType MOOSHROOM
    • MULE

      public static final EntityType MULE
    • OAK_BOAT

      public static final EntityType OAK_BOAT
    • OAK_CHEST_BOAT

      public static final EntityType OAK_CHEST_BOAT
    • OCELOT

      public static final EntityType OCELOT
    • OMINOUS_ITEM_SPAWNER

      public static final EntityType OMINOUS_ITEM_SPAWNER
    • PAINTING

      public static final EntityType PAINTING
    • PALE_OAK_BOAT

      public static final EntityType PALE_OAK_BOAT
    • PALE_OAK_CHEST_BOAT

      public static final EntityType PALE_OAK_CHEST_BOAT
    • PANDA

      public static final EntityType PANDA
    • PARROT

      public static final EntityType PARROT
    • PHANTOM

      public static final EntityType PHANTOM
    • PIG

      public static final EntityType PIG
    • PIGLIN

      public static final EntityType PIGLIN
    • PIGLIN_BRUTE

      public static final EntityType PIGLIN_BRUTE
    • PILLAGER

      public static final EntityType PILLAGER
    • PLAYER

      public static final EntityType PLAYER
    • POLAR_BEAR

      public static final EntityType POLAR_BEAR
    • PUFFERFISH

      public static final EntityType PUFFERFISH
    • RABBIT

      public static final EntityType RABBIT
    • RAVAGER

      public static final EntityType RAVAGER
    • SALMON

      public static final EntityType SALMON
    • SHEEP

      public static final EntityType SHEEP
    • SHULKER

      public static final EntityType SHULKER
    • SHULKER_BULLET

      public static final EntityType SHULKER_BULLET
    • SILVERFISH

      public static final EntityType SILVERFISH
    • SKELETON

      public static final EntityType SKELETON
    • SKELETON_HORSE

      public static final EntityType SKELETON_HORSE
    • SLIME

      public static final EntityType SLIME
    • SMALL_FIREBALL

      public static final EntityType SMALL_FIREBALL
    • SNIFFER

      public static final EntityType SNIFFER
    • SNOW_GOLEM

      public static final EntityType SNOW_GOLEM
    • SNOWBALL

      public static final EntityType SNOWBALL
    • SPAWNER_MINECART

      public static final EntityType SPAWNER_MINECART
    • SPECTRAL_ARROW

      public static final EntityType SPECTRAL_ARROW
    • SPIDER

      public static final EntityType SPIDER
    • SPLASH_POTION

      public static final EntityType SPLASH_POTION
    • SPRUCE_BOAT

      public static final EntityType SPRUCE_BOAT
    • SPRUCE_CHEST_BOAT

      public static final EntityType SPRUCE_CHEST_BOAT
    • SQUID

      public static final EntityType SQUID
    • STRAY

      public static final EntityType STRAY
    • STRIDER

      public static final EntityType STRIDER
    • TADPOLE

      public static final EntityType TADPOLE
    • TEXT_DISPLAY

      public static final EntityType TEXT_DISPLAY
    • TNT

      public static final EntityType TNT
    • TNT_MINECART

      public static final EntityType TNT_MINECART
    • TRADER_LLAMA

      public static final EntityType TRADER_LLAMA
    • TRIDENT

      public static final EntityType TRIDENT
    • TROPICAL_FISH

      public static final EntityType TROPICAL_FISH
    • TURTLE

      public static final EntityType TURTLE
    • VEX

      public static final EntityType VEX
    • VILLAGER

      public static final EntityType VILLAGER
    • VINDICATOR

      public static final EntityType VINDICATOR
    • WANDERING_TRADER

      public static final EntityType WANDERING_TRADER
    • WARDEN

      public static final EntityType WARDEN
    • WIND_CHARGE

      public static final EntityType WIND_CHARGE
    • WITCH

      public static final EntityType WITCH
    • WITHER

      public static final EntityType WITHER
    • WITHER_SKELETON

      public static final EntityType WITHER_SKELETON
    • WITHER_SKULL

      public static final EntityType WITHER_SKULL
    • WOLF

      public static final EntityType WOLF
    • ZOGLIN

      public static final EntityType ZOGLIN
    • ZOMBIE

      public static final EntityType ZOMBIE
    • ZOMBIE_HORSE

      public static final EntityType ZOMBIE_HORSE
    • ZOMBIE_VILLAGER

      public static final EntityType ZOMBIE_VILLAGER
    • ZOMBIFIED_PIGLIN

      public static final EntityType ZOMBIFIED_PIGLIN
    • UNKNOWN

      public static final EntityType UNKNOWN
      An unknown entity without an Entity Class
  • 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
    • 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
    • getEntityClass

      @Nullable public @Nullable Class<? extends Entity> getEntityClass()
    • 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
    • isAlive

      public boolean isAlive()
    • 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)
    • hasDefaultAttributes

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