Package net.glowstone.inventory
Enum Class ToolType
- All Implemented Interfaces:
Serializable
,Comparable<ToolType>
,Constable
,MaterialMatcher
A
MaterialMatcher
implementation for basic tool types.-
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 TypeMethodDescriptionstatic double
getMiningMultiplier
(org.bukkit.Material tool) Get the factor to multiply mining speed with if this tool is used to mine.boolean
matches
(org.bukkit.Material material) Checks the givenMaterial
is equal or better than this ToolType.static ToolType
Returns the enum constant of this class with the specified name.static ToolType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DIAMOND_PICKAXE
-
IRON_PICKAXE
-
STONE_PICKAXE
-
GOLDEN_PICKAXE
-
PICKAXE
-
DIAMOND_AXE
-
IRON_AXE
-
STONE_AXE
-
GOLDEN_AXE
-
AXE
-
DIAMOND_SHOVEL
-
IRON_SHOVEL
-
STONE_SHOVEL
-
GOLDEN_SHOVEL
-
SHOVEL
-
DIAMOND_SWORD
-
IRON_SWORD
-
STONE_SWORD
-
GOLDEN_SWORD
-
SWORD
-
SHEARS
-
-
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
-
matches
public boolean matches(org.bukkit.Material material) Checks the givenMaterial
is equal or better than this ToolType.- Specified by:
matches
in interfaceMaterialMatcher
- Parameters:
material
- The material to check- Returns:
- true if the material is equal or better, false otherwise
-
getMiningMultiplier
public static double getMiningMultiplier(org.bukkit.Material tool) Get the factor to multiply mining speed with if this tool is used to mine.- Returns:
- the multiplier
-