Enum Class CombatLocation

java.lang.Object
java.lang.Enum<CombatLocation>
me.gamercoder215.mobchip.combat.CombatLocation
All Implemented Interfaces:
Serializable, Comparable<CombatLocation>, Constable, Keyed

public enum CombatLocation extends Enum<CombatLocation> implements Keyed
Represents a specific location in combat that a Mob can prepare for.
  • Enum Constant Details

    • VINES

      public static final CombatLocation VINES
      Represents when the Mob takes damage because of falling from vines.
    • SCAFFOLDING

      public static final CombatLocation SCAFFOLDING
      Represents when the Mob takes damage because of scaffolding.
    • OTHER_CLIMBABLE

      public static final CombatLocation OTHER_CLIMBABLE
      Represents when the Mob takes damage because of another falling incident.
    • TWISTING_VINES

      public static final CombatLocation TWISTING_VINES
      Represents when the Mob takes damage because of twisting vines.
    • WEEPING_VINES

      public static final CombatLocation WEEPING_VINES
      Represents when the Mob takes damage because of weeping vines.
    • LADDER

      public static final CombatLocation LADDER
      Represents when the Mob takes damage because of a ladder.
    • WATER

      public static final CombatLocation WATER
      Represents when the Mob takes damage because of water.
  • Method Details

    • values

      public static CombatLocation[] 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 CombatLocation 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
    • getKey

      @NotNull public @NotNull NamespacedKey getKey()
      Fetches the key of this CombatLocation.
      Specified by:
      getKey in interface Keyed
      Returns:
      NamespacedKey of this CombatLocation
    • getByKey

      Fetches a CombatLocation by its NamespacedKey.
      Parameters:
      key - NamespacedKey of the CombatLocation to fetch
      Returns:
      CombatLocation with the given NamespacedKey, or null if none exists