Skip to content

Commit

Permalink
add removeSlotCallback()
Browse files Browse the repository at this point in the history
  • Loading branch information
Snabeldier committed Jan 18, 2025
1 parent c3a586b commit 32a597f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/java/minevalley/core/api/gui/InventoryGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,16 @@ default InventoryGui setItem(@Nonnegative int slot, @Nonnull InterfaceItem item,
@Nonnull
InventoryGui onClickSlot(@Nonnegative int slot, @Nonnull BiConsumer<OnlineUser, InventoryClickEvent> onClick) throws IllegalArgumentException;

/**
* Removes the callback for the specified slot.
*
* @param slot the slot to remove the callback for
* @return this GUI
* @throws IllegalArgumentException if the slot is out of bounds
*/
@Nonnull
InventoryGui removeSlotCallback(@Nonnegative int slot) throws IllegalArgumentException;

/**
* Adds a callback to be called when this GUI is closed.
*
Expand Down

0 comments on commit 32a597f

Please sign in to comment.