Enum MiningLevel
-
- All Implemented Interfaces:
-
java.io.Serializable,kotlin.Comparable
public enum MiningLevel extends Enum<MiningLevel>
Represents the blocks that a tool made of some material is allowed to break.
For example, at a mining level of iron you cannot break obsidian.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classMiningLevel.Companion
-
Method Summary
Modifier and Type Method Description final BooleancanMine(Material material)final BooleanisAtLeast(MiningLevel level)StringtoString()final Array<MiningLevel>values()Returns an array containing the constants of this enum type, in the order they're declared. final MiningLevelvalueOf(String value)Returns the enum constant of this type with the specified name. final IntegergetNumericalLevel()final StringgetName()final IntegergetOrdinal()final EnumEntries<MiningLevel>getEntries()Returns a representation of an immutable list of all enum entries, in the order they're declared. -
-
Method Detail
-
canMine
final Boolean canMine(Material material)
- Returns:
Whether this mining level is capable of mining the given material
-
isAtLeast
final Boolean isAtLeast(MiningLevel level)
- Returns:
Whether this mining level is at least the given level. For example, iron is at least any, wood, stone, gold, and iron.
-
values
final Array<MiningLevel> values()
Returns an array containing the constants of this enum type, in the order they're declared.
This method may be used to iterate over the constants.
-
valueOf
final MiningLevel valueOf(String value)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
-
getNumericalLevel
final Integer getNumericalLevel()
-
getOrdinal
final Integer getOrdinal()
-
getEntries
final EnumEntries<MiningLevel> getEntries()
Returns a representation of an immutable list of all enum entries, in the order they're declared.
This method may be used to iterate over the enum entries.
-
-
-
-