public interface AffectItemStackEvent extends Event, Cancellable
| Modifier and Type | Method and Description |
|---|---|
default List<? extends Transaction<ItemStackSnapshot>> |
filter(Predicate<ItemStack> predicate)
Applies the provided
Predicate to the List of
Transactions from 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<? extends Transaction<ItemStackSnapshot>> |
getTransactions()
Gets a list of the
Transactions for this event. |
getCause, getContext, getSourceisCancelled, setCancelledList<? extends Transaction<ItemStackSnapshot>> getTransactions()
Transactions for this event. If a
transaction is requested to be marked as "invalid",
Transaction.setValid(boolean) can be used.default List<? extends Transaction<ItemStackSnapshot>> filter(Predicate<ItemStack> predicate)
Predicate to the List of
Transactions from 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
predicate - The predicate to use for filteringfalse