Class ActionItem
- java.lang.Object
-
- net.frozenspace.frostlib.gui.design.Item
-
- net.frozenspace.frostlib.gui.design.ActionItem
-
public class ActionItem extends Item
This class represent an Item who do something when clicked in inventory
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull ActionItemamount(int amount)Set the amount in the ItemStackActionItemclick(Click click)Set the action performed when clicking on this itemstatic @NotNull ActionItemcreate(@NotNull org.bukkit.inventory.ItemStack stack)Static method for create a new item (better readability) This method is just callingActionItem(ItemStack)static @NotNull ActionItemcreate(@NotNull org.bukkit.Material material)Static method for create a new item (better readability) This method is just callingActionItem(Material)@NotNull ActionItemflag(@NotNull org.bukkit.inventory.ItemFlag... flags)Set the flags of this item@NotNull ActionItemlore(@NotNull java.lang.String... lores)Set the lore of the item@NotNull ActionItemmaterial(@NotNull org.bukkit.Material material)Set the material of this item@NotNull ActionItemname(@NotNull java.lang.String name)Set the name of the item@NotNull ActionItemstack(@NotNull org.bukkit.inventory.ItemStack stack)Set the itemstack of the item
-
-
-
Method Detail
-
create
@NotNull public static @NotNull ActionItem create(@NotNull @NotNull org.bukkit.Material material)
Static method for create a new item (better readability) This method is just callingActionItem(Material)- Parameters:
material- The material of this item- Returns:
- The ActionItem instance created
-
create
@NotNull public static @NotNull ActionItem create(@NotNull @NotNull org.bukkit.inventory.ItemStack stack)
Static method for create a new item (better readability) This method is just callingActionItem(ItemStack)- Parameters:
stack- The ItemStack of this item- Returns:
- The ActionItem instance created
-
material
@NotNull public @NotNull ActionItem material(@NotNull @NotNull org.bukkit.Material material)
Set the material of this item
-
amount
@NotNull public @NotNull ActionItem amount(int amount)
Set the amount in the ItemStack
-
name
@NotNull public @NotNull ActionItem name(@NotNull @NotNull java.lang.String name)
Set the name of the item
-
lore
@NotNull public @NotNull ActionItem lore(@NotNull @NotNull java.lang.String... lores)
Set the lore of the item
-
flag
@NotNull public @NotNull ActionItem flag(@NotNull @NotNull org.bukkit.inventory.ItemFlag... flags)
Set the flags of this item
-
stack
@NotNull public @NotNull ActionItem stack(@NotNull @NotNull org.bukkit.inventory.ItemStack stack)
Set the itemstack of the item
-
click
public ActionItem click(Click click)
Set the action performed when clicking on this item- Parameters:
click- Action to perform- Returns:
- Current instance
-
-