org.bukkit.event.entity
Enum EntityDamageEvent.DamageModifier

java.lang.Object
  extended by java.lang.Enum<EntityDamageEvent.DamageModifier>
      extended by org.bukkit.event.entity.EntityDamageEvent.DamageModifier
All Implemented Interfaces:
Serializable, Comparable<EntityDamageEvent.DamageModifier>
Enclosing class:
EntityDamageEvent

public static enum EntityDamageEvent.DamageModifier
extends Enum<EntityDamageEvent.DamageModifier>

An enum to specify the types of modifier


Enum Constant Summary
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 raw EntityDamageEvent.getDamage().
BLOCKING
          This represents the damage reduction caused by blocking, only present for Players.
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 resistance
RESISTANCE
          This represents the damage reduction caused by the Resistance potion effect.
 
Method Summary
static EntityDamageEvent.DamageModifier valueOf(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.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

BASE

public static final EntityDamageEvent.DamageModifier BASE
This represents the amount of damage being done, also known as the raw EntityDamageEvent.getDamage().


HARD_HAT

public static final EntityDamageEvent.DamageModifier HARD_HAT
This represents the damage reduced by a wearing a helmet when hit by a falling block.


BLOCKING

public static final EntityDamageEvent.DamageModifier BLOCKING
This represents the damage reduction caused by blocking, only present for Players.


ARMOR

public static final EntityDamageEvent.DamageModifier ARMOR
This represents the damage reduction caused by wearing armor.


RESISTANCE

public static final EntityDamageEvent.DamageModifier RESISTANCE
This represents the damage reduction caused by the Resistance potion effect.


MAGIC

public static final EntityDamageEvent.DamageModifier MAGIC
This represents the damage reduction caused by the combination of:


ABSORPTION

public static final EntityDamageEvent.DamageModifier ABSORPTION
This represents the damage reduction caused by the absorption potion effect.

Method Detail

values

public static EntityDamageEvent.DamageModifier[] 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 (EntityDamageEvent.DamageModifier c : EntityDamageEvent.DamageModifier.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static EntityDamageEvent.DamageModifier 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 name
NullPointerException - if the argument is null


Copyright © 2014. All rights reserved.