public interface AffectItemStackEvent extends TargetInventoryEvent, Cancellable, CauseTracked
Modifier and Type | Method and Description |
---|---|
List<ItemStackTransaction> |
filter(Predicate<ItemStack> predicate)
Applies the provided
Predicate to the List of
ItemStackTransaction s from getTransactions() such that
any time that Predicate.apply(Object) returns false
on a ItemStackTransaction , the ItemStackTransaction is
marked as "invalid" and will not apply post event. |
List<ItemStackTransaction> |
getTransactions()
Gets a list of the
ItemStackTransaction s for this event. |
getTargetInventory
getCallbacks
isCancelled, setCancelled
getCause
List<ItemStackTransaction> getTransactions()
ItemStackTransaction
s for this event. If a
transaction is requested to be marked as "invalid",
ItemStackTransaction.setIsValid(boolean)
can be used.List<ItemStackTransaction> filter(Predicate<ItemStack> predicate)
Predicate
to the List
of
ItemStackTransaction
s from getTransactions()
such that
any time that Predicate.apply(Object)
returns false
on a ItemStackTransaction
, the ItemStackTransaction
is
marked as "invalid" and will not apply post event.predicate
- The predicate to use for filtering