Package org.bukkit.inventory
Class RecipeChoice.MaterialChoice
- java.lang.Object
-
- org.bukkit.inventory.RecipeChoice.MaterialChoice
-
- All Implemented Interfaces:
Cloneable
,Predicate<ItemStack>
,RecipeChoice
- Enclosing interface:
- RecipeChoice
public static class RecipeChoice.MaterialChoice extends Object implements RecipeChoice
Represents a choice of multiple matching Materials.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.bukkit.inventory.RecipeChoice
RecipeChoice.ExactChoice, RecipeChoice.MaterialChoice
-
-
Constructor Summary
Constructors Constructor Description MaterialChoice(List<Material> choices)
MaterialChoice(Material choice)
MaterialChoice(Material... choices)
MaterialChoice(Tag<Material> choices)
Constructs a MaterialChoice with the current values of the specified tag.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RecipeChoice.MaterialChoice
clone()
boolean
equals(Object obj)
List<Material>
getChoices()
ItemStack
getItemStack()
Gets a single item stack representative of this stack choice.int
hashCode()
boolean
test(ItemStack t)
String
toString()
-
-
-
Constructor Detail
-
MaterialChoice
public MaterialChoice(@NotNull Material choice)
-
MaterialChoice
public MaterialChoice(@NotNull Material... choices)
-
MaterialChoice
public MaterialChoice(@NotNull Tag<Material> choices)
Constructs a MaterialChoice with the current values of the specified tag.- Parameters:
choices
- the tag
-
-
Method Detail
-
test
public boolean test(@NotNull ItemStack t)
- Specified by:
test
in interfacePredicate<ItemStack>
- Specified by:
test
in interfaceRecipeChoice
-
getItemStack
@NotNull public ItemStack getItemStack()
Description copied from interface:RecipeChoice
Gets a single item stack representative of this stack choice.- Specified by:
getItemStack
in interfaceRecipeChoice
- Returns:
- a single representative item
-
clone
@NotNull public RecipeChoice.MaterialChoice clone()
- Specified by:
clone
in interfaceRecipeChoice
- Overrides:
clone
in classObject
-
-