Class O2Item
java.lang.Object
net.pottercraft.ollivanders2.item.O2Item
Items for Ollivanders
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable org.bukkit.inventory.ItemStackgetItem(int amount) Get an ItemStack of this item typestatic @Nullable O2ItemTypegetItemType(@NotNull org.bukkit.inventory.ItemStack itemStack) Get the item type for this item stack@NotNull org.bukkit.Materialget the material type for this item@NotNull StringgetName()get the name of this item@NotNull O2ItemTypegetType()get the type for this item
-
Field Details
-
p
Reference to the plugin
-
-
Constructor Details
-
O2Item
Constructor- Parameters:
plugin- reference to the plugintype- the type this item is
-
-
Method Details
-
getItem
@Nullable public @Nullable org.bukkit.inventory.ItemStack getItem(int amount) Get an ItemStack of this item type- Parameters:
amount- the amount of items in the stack- Returns:
- an ItemStack of this item
-
getType
get the type for this item- Returns:
- the O2ItemType
-
getName
get the name of this item- Returns:
- the item name
-
getMaterialType
@NotNull public @NotNull org.bukkit.Material getMaterialType()get the material type for this item- Returns:
- the material type
-
getItemType
@Nullable public static @Nullable O2ItemType getItemType(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack) Get the item type for this item stack- Parameters:
itemStack- the item stack to check- Returns:
- the O2ItemType, if it is one, or null otherwise
-