Enum Class ToolType

java.lang.Object
java.lang.Enum<ToolType>
net.glowstone.inventory.ToolType
All Implemented Interfaces:
Serializable, Comparable<ToolType>, Constable, MaterialMatcher

public enum ToolType extends Enum<ToolType> implements MaterialMatcher
A MaterialMatcher implementation for basic tool types.
  • Enum Constant Details

    • DIAMOND_PICKAXE

      public static final ToolType DIAMOND_PICKAXE
    • IRON_PICKAXE

      public static final ToolType IRON_PICKAXE
    • STONE_PICKAXE

      public static final ToolType STONE_PICKAXE
    • GOLDEN_PICKAXE

      public static final ToolType GOLDEN_PICKAXE
    • PICKAXE

      public static final ToolType PICKAXE
    • DIAMOND_AXE

      public static final ToolType DIAMOND_AXE
    • IRON_AXE

      public static final ToolType IRON_AXE
    • STONE_AXE

      public static final ToolType STONE_AXE
    • GOLDEN_AXE

      public static final ToolType GOLDEN_AXE
    • AXE

      public static final ToolType AXE
    • DIAMOND_SHOVEL

      public static final ToolType DIAMOND_SHOVEL
    • IRON_SHOVEL

      public static final ToolType IRON_SHOVEL
    • STONE_SHOVEL

      public static final ToolType STONE_SHOVEL
    • GOLDEN_SHOVEL

      public static final ToolType GOLDEN_SHOVEL
    • SHOVEL

      public static final ToolType SHOVEL
    • DIAMOND_SWORD

      public static final ToolType DIAMOND_SWORD
    • IRON_SWORD

      public static final ToolType IRON_SWORD
    • STONE_SWORD

      public static final ToolType STONE_SWORD
    • GOLDEN_SWORD

      public static final ToolType GOLDEN_SWORD
    • SWORD

      public static final ToolType SWORD
    • SHEARS

      public static final ToolType SHEARS
  • Method Details

    • values

      public static ToolType[] 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 ToolType 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
    • matches

      public boolean matches(org.bukkit.Material material)
      Checks the given Material is equal or better than this ToolType.
      Specified by:
      matches in interface MaterialMatcher
      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