Class BannedItem

java.lang.Object
fr.andross.banitem.items.BannedItem
Direct Known Subclasses:
CustomBannedItem, MetaItem

public class BannedItem extends Object
An item wrapper, which can handle matching Material/ItemStacks with their ItemMeta and not considering the amount.
Version:
3.1.1
Author:
Andross
  • Constructor Details

    • BannedItem

      public BannedItem(@NotNull org.bukkit.Material m)
      Creating an item without metadata
      Parameters:
      m - material
    • BannedItem

      public BannedItem(@NotNull org.bukkit.inventory.ItemStack item)
      Creating an item, include the ItemMeta of the item
      Parameters:
      item - itemstack
  • Method Details

    • getType

      @NotNull public org.bukkit.Material getType()
      Returns:
      the material of the item
    • getItemMeta

      @Nullable public org.bukkit.inventory.meta.ItemMeta getItemMeta()
      Returns:
      the item meta
    • getData

      public short getData()
      Returns:
      the item data, ignored after 1.13+
    • getItemStack

      @Nullable public org.bukkit.inventory.ItemStack getItemStack()
    • toItemStack

      public org.bukkit.inventory.ItemStack toItemStack()
      Returns:
      an ItemStack representing this item
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object