Class Item
- java.lang.Object
-
- net.frozenspace.frostlib.gui.design.Item
-
- Direct Known Subclasses:
ActionItem
public class Item extends java.lang.ObjectThis class represent an item in the GUI This item is not reactive to click event if you want to execute something when clicking on an item useActionIteminstead
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull Itemamount(int amount)Set the amount of this itemstatic @NotNull Itemcreate(@NotNull org.bukkit.inventory.ItemStack stack)Create a new Item instancestatic @NotNull Itemcreate(@NotNull org.bukkit.Material material)Create a new Item instance@NotNull Itemflag(@NotNull org.bukkit.inventory.ItemFlag... flags)Set the flags of this item@NotNull Itemlore(@NotNull java.lang.String... lore)Set the lore of this item@NotNull Itemmaterial(@NotNull org.bukkit.Material material)Set the material used by this item@NotNull Itemname(@NotNull java.lang.String name)Set the name of this item@NotNull Itemstack(@NotNull org.bukkit.inventory.ItemStack stack)Set the ItemStack of this item
-
-
-
Method Detail
-
create
@NotNull public static @NotNull Item create(@NotNull @NotNull org.bukkit.Material material)
Create a new Item instance- Parameters:
material- Material of this item- Returns:
- Instance created
-
create
@NotNull public static @NotNull Item create(@NotNull @NotNull org.bukkit.inventory.ItemStack stack)
Create a new Item instance- Parameters:
stack- ItemStack of this item- Returns:
- Instance created
-
material
@NotNull public @NotNull Item material(@NotNull @NotNull org.bukkit.Material material)
Set the material used by this item- Parameters:
material- Material of this item- Returns:
- Current instance
-
amount
@NotNull public @NotNull Item amount(int amount)
Set the amount of this item- Parameters:
amount- Amount of the item- Returns:
- Current instance
-
name
@NotNull public @NotNull Item name(@NotNull @NotNull java.lang.String name)
Set the name of this item- Parameters:
name- Name of this item- Returns:
- Current instance
-
lore
@NotNull public @NotNull Item lore(@NotNull @NotNull java.lang.String... lore)
Set the lore of this item- Parameters:
lore- Lore of this item- Returns:
- Current instance
-
flag
@NotNull public @NotNull Item flag(@NotNull @NotNull org.bukkit.inventory.ItemFlag... flags)
Set the flags of this item- Parameters:
flags- Flags to add- Returns:
- Current instance
-
stack
@NotNull public @NotNull Item stack(@NotNull @NotNull org.bukkit.inventory.ItemStack stack)
Set the ItemStack of this item- Parameters:
stack- ItemStack of this item- Returns:
- Current instance
-
-