Package net.okocraft.box.api.transaction
Interface StockHolderTransaction.Withdrawal
- Enclosing class:
StockHolderTransaction
public static interface StockHolderTransaction.Withdrawal
An interface to withdraw items from
StockHolder
.-
Method Summary
Modifier and TypeMethodDescription@NotNull TransactionResult
toInventory
(@NotNull org.bukkit.inventory.Inventory inventory, StockEvent.Cause cause) Withdraws items toInventory
.@NotNull TransactionResult
toTopInventory
(@NotNull org.bukkit.inventory.InventoryView view, StockEvent.Cause cause) Withdraws items toInventoryView.getTopInventory()
.
-
Method Details
-
toInventory
@NotNull @NotNull TransactionResult toInventory(@NotNull @NotNull org.bukkit.inventory.Inventory inventory, @NotNull StockEvent.Cause cause) Withdraws items toInventory
.- Parameters:
inventory
- anInventory
to put items incause
- aStockEvent.Cause
that is passed toStockHolder.decrease(BoxItem, int, StockEvent.Cause)
- Returns:
- a
TransactionResult
- Throws:
NullPointerException
- ifinventory
orcause
is null
-
toTopInventory
@NotNull @NotNull TransactionResult toTopInventory(@NotNull @NotNull org.bukkit.inventory.InventoryView view, @NotNull StockEvent.Cause cause) Withdraws items toInventoryView.getTopInventory()
.This method calls
InventoryClickEvent
s before putting the item in.- Parameters:
view
- anInventoryView
to put items incause
- aStockEvent.Cause
that is passed toStockHolder.decrease(BoxItem, int, StockEvent.Cause)
- Returns:
- a
TransactionResult
- Throws:
NullPointerException
- ifview
orcause
is null
-