Enum Class AnvilDamagedEvent.DamageState

java.lang.Object
java.lang.Enum<AnvilDamagedEvent.DamageState>
com.destroystokyo.paper.event.block.AnvilDamagedEvent.DamageState
All Implemented Interfaces:
Serializable, Comparable<AnvilDamagedEvent.DamageState>, Constable
Enclosing class:
AnvilDamagedEvent

public static enum AnvilDamagedEvent.DamageState extends Enum<AnvilDamagedEvent.DamageState>
Represents the amount of damage on an anvil block
Since:
1.13
  • Enum Constant Details

  • Method Details

    • values

      public static AnvilDamagedEvent.DamageState[] 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 AnvilDamagedEvent.DamageState 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
    • getMaterial

      public Material getMaterial()
      Get block material of this state
      Returns:
      Material
      Since:
      1.13
    • getState

      public static AnvilDamagedEvent.DamageState getState(@Nullable BlockData blockData)
      Get damaged state by block data
      Parameters:
      blockData - Block data
      Returns:
      DamageState
      Throws:
      IllegalArgumentException - If non anvil block data is given
      Since:
      1.13
    • getState

      public static AnvilDamagedEvent.DamageState getState(@Nullable Material material)
      Get damaged state by block material
      Parameters:
      material - Block material
      Returns:
      DamageState
      Throws:
      IllegalArgumentException - If non anvil material is given
      Since:
      1.13