Package net.minestom.server.inventory
Interface TransactionType
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Represents a type of transaction that you can apply to an
AbstractInventory
.-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final TransactionType
Adds an item to the inventory.static final TransactionType
Takes an item from the inventory. -
Method Summary
Modifier and TypeMethodDescriptionprocess
(@NotNull AbstractInventory inventory, @NotNull ItemStack itemStack) process
(@NotNull AbstractInventory inventory, @NotNull ItemStack itemStack, @NotNull TransactionType.SlotPredicate slotPredicate) process
(@NotNull AbstractInventory inventory, @NotNull ItemStack itemStack, @NotNull TransactionType.SlotPredicate slotPredicate, int start, int end, int step)
-
Field Details
-
ADD
Adds an item to the inventory. Can either take an air slot or be stacked. -
TAKE
Takes an item from the inventory. Can either transform items to air or reduce their amount.
-
-
Method Details
-
process
@NotNull @NotNull it.unimi.dsi.fastutil.Pair<ItemStack,Map<Integer, processItemStack>> (@NotNull @NotNull AbstractInventory inventory, @NotNull @NotNull ItemStack itemStack, @NotNull @NotNull TransactionType.SlotPredicate slotPredicate, int start, int end, int step) -
process
@NotNull default @NotNull it.unimi.dsi.fastutil.Pair<ItemStack,Map<Integer, processItemStack>> (@NotNull @NotNull AbstractInventory inventory, @NotNull @NotNull ItemStack itemStack, @NotNull @NotNull TransactionType.SlotPredicate slotPredicate) -
process
-