Enum Class DamageOrigin

java.lang.Object
java.lang.Enum<DamageOrigin>
studio.magemonkey.codex.api.damage.DamageOrigin
All Implemented Interfaces:
Serializable, Comparable<DamageOrigin>, java.lang.constant.Constable

public enum DamageOrigin extends Enum<DamageOrigin>
What kind of thing is dealing the damage described by a DamageRequest.
  • Enum Constant Details

    • WEAPON_MELEE

      public static final DamageOrigin WEAPON_MELEE
      A swing with the weapon in hand.
    • WEAPON_PROJECTILE

      public static final DamageOrigin WEAPON_PROJECTILE
      A projectile launched from a weapon, such as an arrow or a thrown trident.
    • SKILL

      public static final DamageOrigin SKILL
      A skill or spell.
    • EFFECT

      public static final DamageOrigin EFFECT
      A follow-up effect of an earlier hit: bleeding, burning, thorns, area damage and the like.
    • ENVIRONMENT

      public static final DamageOrigin ENVIRONMENT
      The world: falling, fire, drowning and so on.
    • EXTERNAL

      public static final DamageOrigin EXTERNAL
      Anything else, such as a command or a plugin that does not fit the other origins.
  • Method Details

    • values

      public static DamageOrigin[] 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 DamageOrigin 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