Enum Class Nature

java.lang.Object
java.lang.Enum<Nature>
games.stendhal.common.constants.Nature
All Implemented Interfaces:
Serializable, Comparable<Nature>, Constable

public enum Nature extends Enum<Nature>
Available natures. Note that Nature is related to the magic system, and is not intended to support other kinds of "effects", like slowdown, drop, paralysis, etc.
  • Enum Constant Details

    • CUT

      public static final Nature CUT
      physical attack
    • FIRE

      public static final Nature FIRE
      fire magic
    • ICE

      public static final Nature ICE
      ice magic
    • LIGHT

      public static final Nature LIGHT
      light magic
    • DARK

      public static final Nature DARK
      dark magic
  • Method Details

    • values

      public static Nature[] 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 Nature 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
    • parse

      public static Nature parse(String type)
      Parses the Nature, defaulting to CUT for unknown types.
      Parameters:
      type - type name
      Returns:
      Nature