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.
Can be added to any
AbstractInventory
using AbstractInventory.addInventoryCondition(InventoryCondition)
or AbstractInventory.addInventoryCondition(InventoryCondition)
in order to listen to any issued clicks.-
Method Summary
Modifier and TypeMethodDescriptionvoid
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
-