public enum ToolType extends Enum<ToolType> implements MaterialMatcher
MaterialMatcher
implementation for basic tool types.Enum Constant and Description |
---|
AXE |
DIAMOND_AXE |
DIAMOND_PICKAXE |
DIAMOND_SPADE |
DIAMOND_SWORD |
GOLD_AXE |
GOLD_PICKAXE |
GOLD_SPADE |
GOLD_SWORD |
IRON_AXE |
IRON_PICKAXE |
IRON_SPADE |
IRON_SWORD |
PICKAXE |
SHEARS |
SPADE |
STONE_AXE |
STONE_PICKAXE |
STONE_SPADE |
STONE_SWORD |
SWORD |
Modifier and Type | Method and Description |
---|---|
static 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 given
Material is equal or better than this ToolType. |
static ToolType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ToolType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ToolType DIAMOND_PICKAXE
public static final ToolType IRON_PICKAXE
public static final ToolType STONE_PICKAXE
public static final ToolType GOLD_PICKAXE
public static final ToolType PICKAXE
public static final ToolType DIAMOND_AXE
public static final ToolType IRON_AXE
public static final ToolType STONE_AXE
public static final ToolType GOLD_AXE
public static final ToolType AXE
public static final ToolType DIAMOND_SPADE
public static final ToolType IRON_SPADE
public static final ToolType STONE_SPADE
public static final ToolType GOLD_SPADE
public static final ToolType SPADE
public static final ToolType DIAMOND_SWORD
public static final ToolType IRON_SWORD
public static final ToolType STONE_SWORD
public static final ToolType GOLD_SWORD
public static final ToolType SWORD
public static final ToolType SHEARS
public static ToolType[] values()
for (ToolType c : ToolType.values()) System.out.println(c);
public static ToolType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean matches(org.bukkit.Material material)
Material
is equal or better than this ToolType.matches
in interface MaterialMatcher
material
- The material to checkpublic static double getMiningMultiplier(org.bukkit.Material tool)
Copyright © 2021. All rights reserved.