Package org.bukkit.event.entity
Enum EntityDamageEvent.DamageModifier
java.lang.Object
java.lang.Enum<EntityDamageEvent.DamageModifier>
org.bukkit.event.entity.EntityDamageEvent.DamageModifier
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<EntityDamageEvent.DamageModifier>
,java.lang.constant.Constable
- Enclosing class:
- EntityDamageEvent
public static enum EntityDamageEvent.DamageModifier extends java.lang.Enum<EntityDamageEvent.DamageModifier>
An enum to specify the types of modifier
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description ABSORPTION
This represents the damage reduction caused by the absorption potion effect.ARMOR
This represents the damage reduction caused by wearing armor.BASE
This represents the amount of damage being done, also known as the rawEntityDamageEvent.getDamage()
.BLOCKING
This represents the damage reduction caused by blocking, only present forPlayers
.HARD_HAT
This represents the damage reduced by a wearing a helmet when hit by a falling block.MAGIC
This represents the damage reduction caused by the combination of: Armor enchantments Witch's potion resistanceRESISTANCE
This represents the damage reduction caused by the Resistance potion effect. -
Method Summary
Modifier and Type Method Description static EntityDamageEvent.DamageModifier
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static EntityDamageEvent.DamageModifier[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
BASE
This represents the amount of damage being done, also known as the rawEntityDamageEvent.getDamage()
. -
HARD_HAT
This represents the damage reduced by a wearing a helmet when hit by a falling block. -
BLOCKING
This represents the damage reduction caused by blocking, only present forPlayers
. -
ARMOR
This represents the damage reduction caused by wearing armor. -
RESISTANCE
This represents the damage reduction caused by the Resistance potion effect. -
MAGIC
This represents the damage reduction caused by the combination of:- Armor enchantments
- Witch's potion resistance
-
ABSORPTION
This represents the damage reduction caused by the absorption potion effect.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-