Skip to content

Commit 60a94b7

Browse files
committed
added some javaDoc to the setButton method
1 parent 6998854 commit 60a94b7

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

Menu Library/src/main/java/org/broken/arrow/menu/library/MenuUtility.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,21 @@ public ItemStack getMenuItem(final MenuButton menuButton, final ButtonData<T> ca
726726
return null;
727727
}
728728

729+
/**
730+
* Sets a menu button in the inventory if one is found at the given slot or using the fill slot index.
731+
* <p>
732+
* This method retrieves the {@link MenuButton} for the specified slot and attempts to resolve its
733+
* {@link ItemStack} either directly or from the {@code fillSlotIndex}. If a valid button is found,
734+
* it is added to the update list (if marked for updates) and stored in the provided
735+
* {@link MenuDataUtility} cache.
736+
* </p>
737+
*
738+
* @param pageNumber the current page number of the inventory.
739+
* @param menuDataUtility the cache that stores buttons for this page.
740+
* @param slot the inventory slot currently being rendered.
741+
* @param fillSlotIndex the index within {@link #fillSpace} representing the inventory slot where your fill buttons is located.
742+
* @param isLastFillSlot whether this is the final slot in the fill space range.
743+
*/
729744
public void setButton(final int pageNumber, final MenuDataUtility<T> menuDataUtility, final int slot, final int fillSlotIndex, final boolean isLastFillSlot) {
730745
final MenuButton menuButton = getMenuButtonAtSlot(slot, fillSlotIndex);
731746
final ItemStack result = getItemAtSlot(menuButton, slot, fillSlotIndex);

0 commit comments

Comments
 (0)