Class SubItemGroup
java.lang.Object
io.github.thebusybiscuit.slimefun4.api.items.ItemGroup
io.github.thebusybiscuit.slimefun4.api.items.groups.SubItemGroup
- All Implemented Interfaces:
net.kyori.adventure.key.Keyed,org.bukkit.Keyed
- Author:
- TheBusyBiscuit
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionSubItemGroup(org.bukkit.NamespacedKey key, NestedItemGroup parent, org.bukkit.inventory.ItemStack item) SubItemGroup(org.bukkit.NamespacedKey key, NestedItemGroup parent, org.bukkit.inventory.ItemStack item, int tier) -
Method Summary
Modifier and TypeMethodDescriptionfinal NestedItemGroupThis method returns the parentNestedItemGroupwhich thisSubItemGroupbelongs to.final booleanisAccessible(org.bukkit.entity.Player p) This method returns whether thisItemGroupcan be accessed by the givenPlayer.final booleanisVisible(org.bukkit.entity.Player p) This method returns whether thisItemGroupcan be viewed by the givenPlayer.final booleanisVisibleInNested(org.bukkit.entity.Player p) This 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, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.bukkit.Keyed
key
-
Constructor Details
-
SubItemGroup
@ParametersAreNonnullByDefault public SubItemGroup(org.bukkit.NamespacedKey key, NestedItemGroup parent, org.bukkit.inventory.ItemStack item) -
SubItemGroup
@ParametersAreNonnullByDefault public SubItemGroup(org.bukkit.NamespacedKey key, NestedItemGroup parent, org.bukkit.inventory.ItemStack item, int tier)
-
-
Method Details
-
isVisible
public final boolean isVisible(@Nonnull org.bukkit.entity.Player p) 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
public final boolean isAccessible(@Nonnull org.bukkit.entity.Player p) 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
public final boolean isVisibleInNested(@Nonnull org.bukkit.entity.Player p) 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
-