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
ConstructorDescriptionSubItemGroup
(NamespacedKey key, NestedItemGroup parent, ItemStack item) SubItemGroup
(NamespacedKey key, NestedItemGroup parent, ItemStack item, int tier) -
Method Summary
Modifier and TypeMethodDescriptionfinal NestedItemGroup
This method returns the parentNestedItemGroup
which thisSubItemGroup
belongs to.final boolean
final boolean
final boolean
This method returns whether thisSubItemGroup
can be viewed by the givenPlayer
in aNestedItemGroup
.final void
register
(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:ItemGroup
This method returns whether thisItemGroup
can be viewed by the givenPlayer
. EmptyItemGroups
will not be visible. This includesItemGroups
where everySlimefunItem
is disabled. If anItemGroup
is not accessible by thePlayer
, seeItemGroup.isAccessible(Player)
, this method will also return false. -
isAccessible
Description copied from class:ItemGroup
This method returns whether thisItemGroup
can be accessed by the givenPlayer
. If anItemGroup
is not accessible, it will not show up in theSlimefunGuide
nor will items from thisItemGroup
show up in the guide search.- Overrides:
isAccessible
in classItemGroup
- Parameters:
p
- ThePlayer
to check for- Returns:
- Whether this
ItemGroup
is accessible by the givenPlayer
-
isVisibleInNested
This method returns whether thisSubItemGroup
can be viewed by the givenPlayer
in aNestedItemGroup
. EmptyItemGroups
will not be visible. This includesItemGroups
where everySlimefunItem
is disabled. If anItemGroup
is not accessible by thePlayer
, seeisAccessible(Player)
, this method will also return false.- Parameters:
p
- ThePlayer
to check for- Returns:
- Whether this
SubItemGroup
is visible to the givenPlayer
in theNestedItemGroup
-
getParent
This method returns the parentNestedItemGroup
which thisSubItemGroup
belongs to.- Returns:
- The parent
NestedItemGroup
-
register
Description copied from class:ItemGroup
Registers thisItemGroup
.By default, an
ItemGroup
is automatically registered when aSlimefunItem
was added to it.- Overrides:
register
in classItemGroup
- Parameters:
addon
- TheSlimefunAddon
that wants to register thisItemGroup
-