Package fr.andross.banitem.items
Class BannedItem
java.lang.Object
fr.andross.banitem.items.BannedItem
- Direct Known Subclasses:
CustomBannedItem
,MetaItem
An item wrapper, which can handle matching Material/ItemStacks
with their ItemMeta and not considering the amount.
- Version:
- 3.1.1
- Author:
- Andross
-
Constructor Summary
ConstructorsConstructorDescriptionBannedItem
(org.bukkit.inventory.ItemStack item) Creating an item, include the ItemMeta of the itemBannedItem
(org.bukkit.Material m) Creating an item without metadata -
Method Summary
-
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
-
hashCode
public int hashCode()
-