Class O2Item

java.lang.Object
net.pottercraft.ollivanders2.item.O2Item

public class O2Item extends Object
Items for Ollivanders
  • Field Details

    • p

      protected final Ollivanders2 p
      Reference to the plugin
  • Constructor Details

    • O2Item

      public O2Item(@NotNull @NotNull Ollivanders2 plugin, @NotNull @NotNull O2ItemType type)
      Constructor
      Parameters:
      plugin - reference to the plugin
      type - 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

      @NotNull public @NotNull O2ItemType getType()
      get the type for this item
      Returns:
      the O2ItemType
    • getName

      @NotNull public @NotNull String 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