Interface ToolTemplate

All Known Implementing Classes:
ToolTemplateItemStack, ToolTemplateMaterial

public interface ToolTemplate
Represents a template for a ToolCategory's vein mining tool. The ItemStack used to vein mine must match this template (such that matches(ItemStack) is true).
Author:
Parker Hawke - 2008Choco
  • Method Summary

    Modifier and Type Method Description
    default @NotNull Predicate<org.bukkit.inventory.ItemStack> asPredicate()
    Get this template as a Predicate<ItemStack>
    @NotNull ToolCategory getCategory()
    Get the category from which this tool template resides.
    @NotNull AlgorithmConfig getConfig()
    Get the algorithm config for this tool template.
    boolean matches​(@Nullable org.bukkit.inventory.ItemStack item)
    Check whether or not the provided item matches this template.
  • Method Details

    • matches

      boolean matches​(@Nullable @Nullable org.bukkit.inventory.ItemStack item)
      Check whether or not the provided item matches this template.
      Parameters:
      item - the item to check
      Returns:
      true if matches, false otherwise
    • getConfig

      @NotNull @NotNull AlgorithmConfig getConfig()
      Get the algorithm config for this tool template. This template should have precedence over the its category algorithm config as well as the global algorithm config.
      Returns:
      the algorithm config
    • getCategory

      @NotNull @NotNull ToolCategory getCategory()
      Get the category from which this tool template resides.
      Returns:
      the belonging tool category
    • asPredicate

      @NotNull default @NotNull Predicate<org.bukkit.inventory.ItemStack> asPredicate()
      Get this template as a Predicate<ItemStack>
      Returns:
      the template predicate