Class MenuItem
java.lang.Object
dev.sefiraat.sefilib.slimefun.itemgroup.MenuItem
Represents an icon in the
SimpleFlexGroup-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionme.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu.MenuClickHandlerReturns theChestMenu.MenuClickHandlerfor thisMenuItemgetItem()Returns theItemStackthat will be displayed to the players when in the guide.io.github.thebusybiscuit.slimefun4.api.items.ItemGroupReturns theItemGroupof thisMenuItemstatic MenuItemof(io.github.thebusybiscuit.slimefun4.api.items.ItemGroup itemGroup) Creates a new MenuItem derived from an ItemGroupstatic MenuItemof(ItemStack item, me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu.MenuClickHandler clickHandler) Creates a new MenuItem derived from an ItemStack and a customChestMenu.MenuClickHandler
-
Constructor Details
-
MenuItem
public MenuItem(@Nonnull io.github.thebusybiscuit.slimefun4.api.items.ItemGroup itemGroup) Creates a new MenuItem- Parameters:
itemGroup- TheItemGroupto be added. Accepts Flex, Nested and ItemGroup (DummyItemGroup) is preferable.
-
MenuItem
public MenuItem(@Nonnull ItemStack item, @Nonnull me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu.MenuClickHandler clickHandler) - Parameters:
item- TheItemStackto be displayedclickHandler- TheChestMenu.MenuClickHandlerto be executed when the item is clicked
-
-
Method Details
-
getItem
Returns theItemStackthat will be displayed to the players when in the guide.- Returns:
- The
ItemStackto be displayed
-
getClickHandler
@Nullable public me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu.MenuClickHandler getClickHandler()Returns theChestMenu.MenuClickHandlerfor thisMenuItem- Returns:
- The
ChestMenu.MenuClickHandlerfor thisMenuItem
-
getItemGroup
@Nullable public io.github.thebusybiscuit.slimefun4.api.items.ItemGroup getItemGroup()Returns theItemGroupof thisMenuItem- Returns:
- The
ItemGroupof thisMenuItem
-
of
@Nonnull public static MenuItem of(io.github.thebusybiscuit.slimefun4.api.items.ItemGroup itemGroup) Creates a new MenuItem derived from an ItemGroup- Parameters:
itemGroup- the ItemGroup to be added to the group- Returns:
- Returns a new MenuItem
-
of
@Nonnull public static MenuItem of(ItemStack item, me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu.MenuClickHandler clickHandler) Creates a new MenuItem derived from an ItemStack and a customChestMenu.MenuClickHandler- Parameters:
item- the ItemStack to display on the guideclickHandler- the MenuClickHandler to be executed when the item is clicked- Returns:
- Returns a new MenuItem
-