Class MetaChecks

java.lang.Object
me.mehboss.utils.MetaChecks

public class MetaChecks extends Object
Handles all metadata comparison logic used during special recipe matching.

Provides utility checks for matching item materials, display names, and custom identifiers. This class is used internally by RecipeUtil and recipe handlers to determine whether an input item matches a defined ingredient.

  • Constructor Details

    • MetaChecks

      public MetaChecks()
  • Method Details

    • itemsMatch

      public Boolean itemsMatch(String recipeName, org.bukkit.inventory.ItemStack item, RecipeUtil.Ingredient ingredient)
      Compares an input item against a recipe ingredient definition.

      Validates:

      • null vs non-null mismatches
      • material type
      • custom identifier match (if present)
      • display name match (if present)
      Parameters:
      recipeName - name of the recipe (used for debug output)
      item - the actual input item
      ingredient - expected ingredient definition
      Returns:
      true if the item satisfies all required checks