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

    Constructors
    Constructor
    Description
    Creates a new SimpleFlexGroup
  • Method Summary

    Modifier and Type
    Method
    Description
    addItemGroup(io.github.thebusybiscuit.slimefun4.api.items.ItemGroup itemGroup)
    Adds an ItemGroup that will be displayed to the players when this group is opened.
    Adds an ItemStack and a custom ChestMenu.MenuClickHandler that will be displayed to the players when this group is opened.
    boolean
    isVisible(Player player, io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile playerProfile, io.github.thebusybiscuit.slimefun4.core.guide.SlimefunGuideMode guideMode)
     
    void
    open(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, remove

    Methods 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

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • SimpleFlexGroup

      @ParametersAreNonnullByDefault public SimpleFlexGroup(JavaPlugin plugin, String name, NamespacedKey key, ItemStack item)
      Creates a new SimpleFlexGroup
      Parameters:
      plugin - The JavaPlugin instance of your addon.
      name - The name of the Group, this will be displayed when opened
      key - The NamespacedKey used to assign this group
      item - The ItemStack which 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:
      isVisible in class io.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:
      open in class io.github.thebusybiscuit.slimefun4.api.items.groups.FlexItemGroup
    • addItemGroup

      public SimpleFlexGroup addItemGroup(@Nonnull io.github.thebusybiscuit.slimefun4.api.items.ItemGroup itemGroup)
      Adds an ItemGroup that will be displayed to the players when this group is opened. items are displayed in the order they are added.
      Parameters:
      itemGroup - The ItemGroup to be added. Accepts Flex, Nested also
      Returns:
      Returns this group, for method chaining
    • addMenuItem

      public SimpleFlexGroup addMenuItem(@Nonnull MenuItem menuItem)
      Adds an ItemStack and a custom ChestMenu.MenuClickHandler that will be displayed to the players when this group is opened. items are displayed in the order they are added.
      Parameters:
      menuItem - The MenuItem to be added. Accepts Flex, Nested also
      Returns:
      Returns this group, for method chaining