Package org.bukkit.entity
Enum EntityCategory
- java.lang.Object
-
- java.lang.Enum<EntityCategory>
-
- org.bukkit.entity.EntityCategory
-
- All Implemented Interfaces:
Serializable
,Comparable<EntityCategory>
public enum EntityCategory extends Enum<EntityCategory>
A classification of entities which may behave differently than others or be affected uniquely by enchantments and potion effects among other things.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static EntityCategory
valueOf(String name)
Returns the enum constant of this type with the specified name.static EntityCategory[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final EntityCategory NONE
Any uncategorized entity. No additional effects are applied to these entities relating to a categorization.
-
UNDEAD
public static final EntityCategory UNDEAD
Undead creatures. These creatures:- Are damaged by potions of healing.
- Are healed by potions of harming.
- Are immune to drowning and poison.
- Are subject to burning in daylight (though not all).
- Sink in water (except
Drowned
,Phantoms
andWithers
). - Take additional damage from
Enchantment.DAMAGE_UNDEAD
. - Are ignored by
Withers
.
-
ARTHROPOD
public static final EntityCategory ARTHROPOD
Entities of the arthropod family. These creatures:- Take additional damage and receive
PotionEffectType.SLOW
fromEnchantment.DAMAGE_ARTHROPODS
. - Are immune to
PotionEffectType.POISON
if they are spiders.
- Take additional damage and receive
-
ILLAGER
public static final EntityCategory ILLAGER
Entities that participate in raids. These creatures:- Are immune to damage from
EvokerFangs
. - Are ignored by
vindicators
named "Johnny". - Are hostile to
villagers
,wandering traders
,iron golems
andplayers
.
- Are immune to damage from
-
WATER
public static final EntityCategory WATER
Entities that reside primarily underwater (excludingDrowned
). These creatures:- Take additional damage from
Enchantment.IMPALING
. - Are immune to drowning (excluding
dolphins
). - Take suffocation damage when out of water for extended periods of
time (excluding
guardians
andturtles
). - Are capable of swimming in water rather than floating or sinking.
- Take additional damage from
-
-
Method Detail
-
values
public static EntityCategory[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (EntityCategory c : EntityCategory.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EntityCategory valueOf(String name)
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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-