Class SimpleFlexGroup
java.lang.Object
io.github.thebusybiscuit.slimefun4.api.items.ItemGroup
io.github.thebusybiscuit.slimefun4.api.items.groups.FlexItemGroup
dev.sefiraat.sefilib.slimefun.itemgroup.SimpleFlexGroup
- All Implemented Interfaces:
Keyed
public class SimpleFlexGroup
extends io.github.thebusybiscuit.slimefun4.api.items.groups.FlexItemGroup
This class is designed to be the 'Main' item group for any given addon. Should only be used when you
both want FlexItemGroups within your 'main' group and also have them be Nested.
- Author:
- Sefiraat, ybw0014
-
Field Summary
Fields inherited from class io.github.thebusybiscuit.slimefun4.api.items.ItemGroup
crossAddonItemGroup, item, items, key, tier -
Constructor Summary
ConstructorsConstructorDescriptionSimpleFlexGroup(JavaPlugin plugin, String name, NamespacedKey key, ItemStack item) Creates a new SimpleFlexGroup -
Method Summary
Modifier and TypeMethodDescriptionaddItemGroup(io.github.thebusybiscuit.slimefun4.api.items.ItemGroup itemGroup) Adds anItemGroupthat will be displayed to the players when this group is opened.addMenuItem(MenuItem menuItem) Adds anItemStackand a customChestMenu.MenuClickHandlerthat will be displayed to the players when this group is opened.booleanisVisible(Player player, io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile playerProfile, io.github.thebusybiscuit.slimefun4.core.guide.SlimefunGuideMode guideMode) voidopen(Player p, io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile profile, io.github.thebusybiscuit.slimefun4.core.guide.SlimefunGuideMode mode) Methods inherited from class io.github.thebusybiscuit.slimefun4.api.items.groups.FlexItemGroup
add, contains, getItems, isVisible, removeMethods inherited from class io.github.thebusybiscuit.slimefun4.api.items.ItemGroup
equals, getAddon, getDisplayName, getItem, getKey, getTier, getUnlocalizedName, hashCode, isAccessible, isCrossAddonItemGroup, isHidden, isRegistered, register, setCrossAddonItemGroup, setTier, toString
-
Constructor Details
-
SimpleFlexGroup
@ParametersAreNonnullByDefault public SimpleFlexGroup(JavaPlugin plugin, String name, NamespacedKey key, ItemStack item) Creates a new SimpleFlexGroup- Parameters:
plugin- TheJavaPlugininstance of your addon.name- The name of the Group, this will be displayed when openedkey- TheNamespacedKeyused to assign this groupitem- TheItemStackwhich will act as the display item
-
-
Method Details
-
isVisible
@ParametersAreNonnullByDefault public boolean isVisible(Player player, io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile playerProfile, io.github.thebusybiscuit.slimefun4.core.guide.SlimefunGuideMode guideMode) - Specified by:
isVisiblein classio.github.thebusybiscuit.slimefun4.api.items.groups.FlexItemGroup
-
open
@ParametersAreNonnullByDefault public void open(Player p, io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile profile, io.github.thebusybiscuit.slimefun4.core.guide.SlimefunGuideMode mode) - Specified by:
openin classio.github.thebusybiscuit.slimefun4.api.items.groups.FlexItemGroup
-
addItemGroup
public SimpleFlexGroup addItemGroup(@Nonnull io.github.thebusybiscuit.slimefun4.api.items.ItemGroup itemGroup) Adds anItemGroupthat will be displayed to the players when this group is opened. items are displayed in the order they are added.- Parameters:
itemGroup- TheItemGroupto be added. Accepts Flex, Nested also- Returns:
- Returns this group, for method chaining
-
addMenuItem
Adds anItemStackand a customChestMenu.MenuClickHandlerthat will be displayed to the players when this group is opened. items are displayed in the order they are added.- Parameters:
menuItem- TheMenuItemto be added. Accepts Flex, Nested also- Returns:
- Returns this group, for method chaining
-