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
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TagType<ItemPredicate, org.bukkit.inventory.ItemStack> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(org.bukkit.inventory.ItemStack value) Checks if the given ItemStack satisfies any predicate in this tag or included tags.getAll()Flattens all predicates from this and included tags.TagType<ItemPredicate, org.bukkit.inventory.ItemStack> getType()Retrieves the specific type of this tag.
-
Field Details
-
TYPE
-
-
Constructor Details
-
ItemTag
public ItemTag(net.kyori.adventure.key.Key id) Constructs a new ItemTag.- Parameters:
id- The tag identifier.
-
-
Method Details
-
getType
Retrieves the specific type of this tag.- Specified by:
getTypein classTag<ItemPredicate, org.bukkit.inventory.ItemStack>- Returns:
- The
TagTypes.ITEMtype.
-
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:
containsin classTag<ItemPredicate, org.bukkit.inventory.ItemStack>- Parameters:
value- TheItemStackto test.- Returns:
trueif the stack matches.
-
getAll
Flattens all predicates from this and included tags.- Specified by:
getAllin classTag<ItemPredicate, org.bukkit.inventory.ItemStack>- Returns:
- A
Setof all applicableItemPredicates.
-