Interface InventoryCondition
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface InventoryCondition
Can be added to any
InventoryModifier
using Inventory.addInventoryCondition(InventoryCondition)
or PlayerInventory.addInventoryCondition(InventoryCondition)
in order to listen to any issued clicks.-
Method Summary
Modifier and Type Method Description void
accept(Player player, int slot, ClickType clickType, InventoryConditionResult inventoryConditionResult)
Called when aPlayer
clicks in the inventory where thisInventoryCondition
has been added to.
-
Method Details
-
accept
void accept(Player player, int slot, ClickType clickType, InventoryConditionResult inventoryConditionResult)Called when aPlayer
clicks in the inventory where thisInventoryCondition
has been added to.- Parameters:
player
- the player who clicked in the inventoryslot
- the slot clicked, can be -999 if the click is out of the inventoryclickType
- the click typeinventoryConditionResult
- the result of this callback
-