Package net.okocraft.box.api.transaction
Interface StockHolderTransaction.Deposit
- Enclosing class:
StockHolderTransaction
public static interface StockHolderTransaction.Deposit
An interface to deposit items to
StockHolder
.-
Method Summary
Modifier and TypeMethodDescription@NotNull @Unmodifiable List
<TransactionResult> fromInventory
(@NotNull org.bukkit.inventory.Inventory inventory, StockEvent.Cause cause) Deposits items fromInventory
.@NotNull @Unmodifiable List
<TransactionResult> fromTopInventory
(@NotNull org.bukkit.inventory.InventoryView view, StockEvent.Cause cause) Deposits items fromInventoryView.getTopInventory()
.
-
Method Details
-
fromInventory
@NotNull @NotNull @Unmodifiable List<TransactionResult> fromInventory(@NotNull @NotNull org.bukkit.inventory.Inventory inventory, @NotNull StockEvent.Cause cause) Deposits items fromInventory
.If no items are deposited, this method returns
Collections.emptyList()
- Parameters:
inventory
- anInventory
to pull out itemscause
- aStockEvent.Cause
that is passed toStockHolder.increase(BoxItem, int, StockEvent.Cause)
- Returns:
- a list that contains
TransactionResult
s per item orCollections.emptyList()
if no items are deposited - Throws:
NullPointerException
- ifinventory
orcause
is null
-
fromTopInventory
@NotNull @NotNull @Unmodifiable List<TransactionResult> fromTopInventory(@NotNull @NotNull org.bukkit.inventory.InventoryView view, @NotNull StockEvent.Cause cause) Deposits items fromInventoryView.getTopInventory()
.If no items are deposited, this method returns
Collections.emptyList()
This method calls
InventoryClickEvent
s before pulling out the item.- Parameters:
view
- anInventoryView
to get topInventory
cause
- aStockEvent.Cause
that is passed toStockHolder.increase(BoxItem, int, StockEvent.Cause)
- Returns:
- a list that contains
TransactionResult
s per item orCollections.emptyList()
if no items are deposited - Throws:
NullPointerException
- ifview
orcause
is null
-