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
Represents the amount of damage on an anvil block
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet block material of this stateGet damaged state by block dataGet damaged state by block materialReturns the enum constant of this class with the specified name.static AnvilDamagedEvent.DamageState[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FULL
-
CHIPPED
-
DAMAGED
-
BROKEN
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getMaterial
Get block material of this state- Returns:
- Material
-
getState
@NotNull public static @NotNull AnvilDamagedEvent.DamageState getState(@Nullable @Nullable BlockData blockData) Get damaged state by block data- Parameters:
blockData
- Block data- Returns:
- DamageState
- Throws:
IllegalArgumentException
- If non anvil block data is given
-
getState
@NotNull public static @NotNull AnvilDamagedEvent.DamageState getState(@Nullable @Nullable Material material) Get damaged state by block material- Parameters:
material
- Block material- Returns:
- DamageState
- Throws:
IllegalArgumentException
- If non anvil material is given
-