Interface InventoryTransactionResult.Builder
- All Superinterfaces:
AbstractBuilder<InventoryTransactionResult>
,Builder<InventoryTransactionResult,
,InventoryTransactionResult.Builder> CopyableBuilder<InventoryTransactionResult,
,InventoryTransactionResult.Builder> ResettableBuilder<InventoryTransactionResult,
InventoryTransactionResult.Builder>
- All Known Subinterfaces:
InventoryTransactionResult.Builder.PollBuilder
- Enclosing interface:
- InventoryTransactionResult
public static interface InventoryTransactionResult.Builder
extends Builder<InventoryTransactionResult,InventoryTransactionResult.Builder>, CopyableBuilder<InventoryTransactionResult,InventoryTransactionResult.Builder>
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates a newInventoryTransactionResult
.poll
(ItemStackSnapshot itemStack) Sets the providedItemStackSnapshot
as the stack that has been polled from the inventory.reject
(Iterable<ItemStackSnapshot> itemStacks) Adds the provideditemstacks
as stacks that have been "rejected".Adds the provideditemstacks
as stacks that have been "rejected".transaction
(Iterable<SlotTransaction> slotTransactions) Adds the provideditemstacks
as stacks that are being replaced.transaction
(SlotTransaction... slotTransactions) Adds the provideditemstacks
as stacks that are being replaced.Sets theInventoryTransactionResult.Type
of transaction result being built.Methods inherited from interface org.spongepowered.api.util.CopyableBuilder
from
-
Method Details
-
type
Sets theInventoryTransactionResult.Type
of transaction result being built.- Parameters:
type
- The type of transaction result- Returns:
- This builder, for chaining
-
reject
Adds the provideditemstacks
as stacks that have been "rejected".- Parameters:
itemStacks
- The itemstacks being rejected- Returns:
- This builder, for chaining
-
reject
Adds the provideditemstacks
as stacks that have been "rejected".- Parameters:
itemStacks
- The itemstacks being rejected- Returns:
- This builder, for chaining
-
poll
Sets the providedItemStackSnapshot
as the stack that has been polled from the inventory.- Parameters:
itemStack
- The polled itemstack- Returns:
- This builder, for chaining
-
transaction
Adds the provideditemstacks
as stacks that are being replaced.- Parameters:
slotTransactions
- The slotTransactions- Returns:
- This builder, for chaining
-
transaction
Adds the provideditemstacks
as stacks that are being replaced.- Parameters:
slotTransactions
- The slotTransactions- Returns:
- This builder, for chaining
-
build
InventoryTransactionResult build()Creates a newInventoryTransactionResult
.- Specified by:
build
in interfaceAbstractBuilder<InventoryTransactionResult>
- Returns:
- A new inventory transaction result
-