Class SubItemGroup
java.lang.Object
io.github.thebusybiscuit.slimefun4.api.items.ItemGroup
io.github.thebusybiscuit.slimefun4.api.items.groups.SubItemGroup
- All Implemented Interfaces:
Keyed
- Author:
- TheBusyBiscuit
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionSubItemGroup(NamespacedKey key, NestedItemGroup parent, ItemStack item) SubItemGroup(NamespacedKey key, NestedItemGroup parent, ItemStack item, int tier) -
Method Summary
Modifier and TypeMethodDescriptionfinal NestedItemGroupThis method returns the parentNestedItemGroupwhich thisSubItemGroupbelongs to.final booleanfinal booleanfinal booleanThis method returns whether thisSubItemGroupcan be viewed by the givenPlayerin aNestedItemGroup.final voidregister(SlimefunAddon addon) Registers thisItemGroup.Methods inherited from class io.github.thebusybiscuit.slimefun4.api.items.ItemGroup
add, contains, equals, getAddon, getDisplayName, getItem, getItems, getKey, getTier, getUnlocalizedName, hashCode, isCrossAddonItemGroup, isHidden, isRegistered, remove, setCrossAddonItemGroup, setTier, toString
-
Constructor Details
-
SubItemGroup
@ParametersAreNonnullByDefault public SubItemGroup(NamespacedKey key, NestedItemGroup parent, ItemStack item) -
SubItemGroup
@ParametersAreNonnullByDefault public SubItemGroup(NamespacedKey key, NestedItemGroup parent, ItemStack item, int tier)
-
-
Method Details
-
isVisible
Description copied from class:ItemGroupThis method returns whether thisItemGroupcan be viewed by the givenPlayer. EmptyItemGroupswill not be visible. This includesItemGroupswhere everySlimefunItemis disabled. If anItemGroupis not accessible by thePlayer, seeItemGroup.isAccessible(Player), this method will also return false. -
isAccessible
Description copied from class:ItemGroupThis method returns whether thisItemGroupcan be accessed by the givenPlayer. If anItemGroupis not accessible, it will not show up in theSlimefunGuidenor will items from thisItemGroupshow up in the guide search.- Overrides:
isAccessiblein classItemGroup- Parameters:
p- ThePlayerto check for- Returns:
- Whether this
ItemGroupis accessible by the givenPlayer
-
isVisibleInNested
This method returns whether thisSubItemGroupcan be viewed by the givenPlayerin aNestedItemGroup. EmptyItemGroupswill not be visible. This includesItemGroupswhere everySlimefunItemis disabled. If anItemGroupis not accessible by thePlayer, seeisAccessible(Player), this method will also return false.- Parameters:
p- ThePlayerto check for- Returns:
- Whether this
SubItemGroupis visible to the givenPlayerin theNestedItemGroup
-
getParent
This method returns the parentNestedItemGroupwhich thisSubItemGroupbelongs to.- Returns:
- The parent
NestedItemGroup
-
register
Description copied from class:ItemGroupRegisters thisItemGroup.By default, an
ItemGroupis automatically registered when aSlimefunItemwas added to it.- Overrides:
registerin classItemGroup- Parameters:
addon- TheSlimefunAddonthat wants to register thisItemGroup
-