Class ItemTag

java.lang.Object
com.github.darksoulq.abyssallib.world.data.tag.Tag<ItemPredicate, org.bukkit.inventory.ItemStack>
com.github.darksoulq.abyssallib.world.data.tag.impl.ItemTag

public class ItemTag extends Tag<ItemPredicate, org.bukkit.inventory.ItemStack>
Implementation of a Tag for ItemStacks, using ItemPredicate entries.
  • Field Details

  • Constructor Details

    • ItemTag

      public ItemTag(net.kyori.adventure.key.Key id)
      Constructs a new ItemTag.
      Parameters:
      id - The tag identifier.
  • Method Details

    • getType

      public TagType<ItemPredicate, org.bukkit.inventory.ItemStack> getType()
      Retrieves the specific type of this tag.
      Specified by:
      getType in class Tag<ItemPredicate, org.bukkit.inventory.ItemStack>
      Returns:
      The TagTypes.ITEM type.
    • contains

      public boolean contains(org.bukkit.inventory.ItemStack value)
      Checks if the given ItemStack satisfies any predicate in this tag or included tags.
      Specified by:
      contains in class Tag<ItemPredicate, org.bukkit.inventory.ItemStack>
      Parameters:
      value - The ItemStack to test.
      Returns:
      true if the stack matches.
    • getAll

      public Set<ItemPredicate> getAll()
      Flattens all predicates from this and included tags.
      Specified by:
      getAll in class Tag<ItemPredicate, org.bukkit.inventory.ItemStack>
      Returns:
      A Set of all applicable ItemPredicates.