Class SlotTransaction
- java.lang.Object
-
- org.spongepowered.api.data.Transaction<ItemStackSnapshot>
-
- org.spongepowered.api.item.inventory.transaction.SlotTransaction
-
- All Implemented Interfaces:
DataSerializable
public class SlotTransaction extends Transaction<ItemStackSnapshot>
-
-
Constructor Summary
Constructors Constructor Description SlotTransaction(Slot slot, ItemStackSnapshot original, ItemStackSnapshot defaultReplacement)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setCustom(ItemStack stack)
Sets the customItemStack
output of thisSlotTransaction
.Slot
slot()
Gets theSlot
of thisSlotTransaction
.java.lang.String
toString()
-
Methods inherited from class org.spongepowered.api.data.Transaction
contentVersion, custom, defaultReplacement, equals, finalReplacement, hashCode, intermediary, invalidate, isValid, original, setCustom, setValid, toContainer, validate
-
-
-
-
Constructor Detail
-
SlotTransaction
public SlotTransaction(Slot slot, ItemStackSnapshot original, ItemStackSnapshot defaultReplacement)
- Parameters:
slot
- The slotoriginal
- The original item stack snapshotdefaultReplacement
- The replacement item stack snapshot
-
-
Method Detail
-
setCustom
public void setCustom(ItemStack stack)
Sets the customItemStack
output of thisSlotTransaction
.- Parameters:
stack
- The stack
-
slot
public Slot slot()
Gets theSlot
of thisSlotTransaction
.- Returns:
- The slot of this transaction
-
toString
public java.lang.String toString()
- Overrides:
toString
in classTransaction<ItemStackSnapshot>
-
-