public interface AffectSlotEvent extends AffectItemStackEvent
| Modifier and Type | Method and Description |
|---|---|
default List<SlotTransaction> |
filter(Predicate<ItemStack> predicate)
Applies the provided
Predicate to the List of
Transactions from AffectItemStackEvent.getTransactions() such that
any time that Predicate.test(Object) returns false
on a Transaction, the Transaction is
marked as "invalid" and will not apply post event. |
List<SlotTransaction> |
getTransactions()
Gets a list of the
Transactions for this event. |
getCause, getContext, getSourceisCancelled, setCancelledList<SlotTransaction> getTransactions()
AffectItemStackEventTransactions for this event. If a
transaction is requested to be marked as "invalid",
Transaction.setValid(boolean) can be used.getTransactions in interface AffectItemStackEventdefault List<SlotTransaction> filter(Predicate<ItemStack> predicate)
AffectItemStackEventPredicate to the List of
Transactions from AffectItemStackEvent.getTransactions() such that
any time that Predicate.test(Object) returns false
on a Transaction, the Transaction is
marked as "invalid" and will not apply post event.
Transaction.getFinal() is used to construct
the ItemStack to pass to the predicate
filter in interface AffectItemStackEventpredicate - The predicate to use for filteringfalse