Class NestedItemGroup
java.lang.Object
io.github.thebusybiscuit.slimefun4.api.items.ItemGroup
io.github.thebusybiscuit.slimefun4.api.items.groups.FlexItemGroup
io.github.thebusybiscuit.slimefun4.api.items.groups.NestedItemGroup
- All Implemented Interfaces:
Keyed
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionNestedItemGroup(NamespacedKey key, ItemStack item) NestedItemGroup(NamespacedKey key, ItemStack item, int tier) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSubGroup(SubItemGroup group) This will add the givenSubItemGroupto thisNestedItemGroup.booleanisVisible(Player p, PlayerProfile profile, SlimefunGuideMode mode) This method returns whether thisFlexItemGroupis visible under the given context.voidopen(Player p, PlayerProfile profile, SlimefunGuideMode mode) This method is called when aPlayeropens thisFlexItemGroup.voidremoveSubGroup(SubItemGroup group) This will remove the givenSubItemGroupfrom thisNestedItemGroup(if present).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
-
NestedItemGroup
-
NestedItemGroup
-
-
Method Details
-
addSubGroup
This will add the givenSubItemGroupto thisNestedItemGroup.- Parameters:
group- TheSubItemGroupto add.
-
removeSubGroup
This will remove the givenSubItemGroupfrom thisNestedItemGroup(if present).- Parameters:
group- TheSubItemGroupto remove.
-
isVisible
@ParametersAreNonnullByDefault public boolean isVisible(Player p, PlayerProfile profile, SlimefunGuideMode mode) Description copied from class:FlexItemGroupThis method returns whether thisFlexItemGroupis visible under the given context. Implementing this method gives full flexibility over who can see the ItemGroup when and where.- Specified by:
isVisiblein classFlexItemGroup- Parameters:
p- ThePlayerwho opened hisSlimefunGuideprofile- ThePlayerProfileof thePlayermode- TheSlimefunGuideModein which thisFlexItemGroupis viewed- Returns:
- Whether to display this
FlexItemGroup
-
open
@ParametersAreNonnullByDefault public void open(Player p, PlayerProfile profile, SlimefunGuideMode mode) Description copied from class:FlexItemGroupThis method is called when aPlayeropens thisFlexItemGroup. This is an abstract method which needs to be implemented in order to determine what thisFlexItemGroupshould actually do as it cannot hold any items.- Specified by:
openin classFlexItemGroup- Parameters:
p- ThePlayerwho wants to open thisFlexItemGroupprofile- The correspondingPlayerProfilefor thatPlayermode- The currentSlimefunGuideMode
-