Package org.bukkit.event.entity
Enum EntityRegainHealthEvent.RegainReason
- java.lang.Object
-
- java.lang.Enum<EntityRegainHealthEvent.RegainReason>
-
- org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason
-
- All Implemented Interfaces:
Serializable,Comparable<EntityRegainHealthEvent.RegainReason>
- Enclosing class:
- EntityRegainHealthEvent
public static enum EntityRegainHealthEvent.RegainReason extends Enum<EntityRegainHealthEvent.RegainReason>
An enum to specify the type of health regaining that is occurring
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CUSTOMAny other reason not covered by the reasons aboveEATINGWhen a player regains health from eating consumablesENDER_CRYSTALWhen an ender dragon regains health from an ender crystalMAGICWhen a player is healed by a potion or spellMAGIC_REGENWhen a player is healed over time by a potion or spellREGENWhen a player regains health from regenerating due to Peaceful mode (difficulty=0)SATIATEDWhen a player regains health from regenerating due to their hunger being satisfiedWITHERWhen an entity is damaged by the Wither potion effectWITHER_SPAWNWhen a wither is filling its health during spawning
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static EntityRegainHealthEvent.RegainReasonvalueOf(String name)Returns the enum constant of this type with the specified name.static EntityRegainHealthEvent.RegainReason[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
REGEN
public static final EntityRegainHealthEvent.RegainReason REGEN
When a player regains health from regenerating due to Peaceful mode (difficulty=0)
-
SATIATED
public static final EntityRegainHealthEvent.RegainReason SATIATED
When a player regains health from regenerating due to their hunger being satisfied
-
EATING
public static final EntityRegainHealthEvent.RegainReason EATING
When a player regains health from eating consumables
-
ENDER_CRYSTAL
public static final EntityRegainHealthEvent.RegainReason ENDER_CRYSTAL
When an ender dragon regains health from an ender crystal
-
MAGIC
public static final EntityRegainHealthEvent.RegainReason MAGIC
When a player is healed by a potion or spell
-
MAGIC_REGEN
public static final EntityRegainHealthEvent.RegainReason MAGIC_REGEN
When a player is healed over time by a potion or spell
-
WITHER_SPAWN
public static final EntityRegainHealthEvent.RegainReason WITHER_SPAWN
When a wither is filling its health during spawning
-
WITHER
public static final EntityRegainHealthEvent.RegainReason WITHER
When an entity is damaged by the Wither potion effect
-
CUSTOM
public static final EntityRegainHealthEvent.RegainReason CUSTOM
Any other reason not covered by the reasons above
-
-
Method Detail
-
values
public static EntityRegainHealthEvent.RegainReason[] 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 (EntityRegainHealthEvent.RegainReason c : EntityRegainHealthEvent.RegainReason.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EntityRegainHealthEvent.RegainReason 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
-
-