Contents
Class SlotTransaction
java.lang.Object
com.hypixel.hytale.server.core.inventory.transaction.SlotTransaction
- All Implemented Interfaces:
Transaction
- Direct Known Subclasses:
ItemStackSlotTransaction, MaterialSlotTransaction, ResourceSlotTransaction, TagSlotTransaction
- Since:
- 18/3/17.
- Version:
- 1.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSlotTransaction(boolean succeeded, ActionType action, short slot, ItemStack slotBefore, ItemStack slotAfter, ItemStack output, boolean allOrNothing, boolean exactAmount, boolean filter) -
Method Summary
Modifier and TypeMethodDescriptionfromParent(ItemContainer parent, short start, ItemContainer container) Transforms this transactions data from referencing about a slot in the provided parent to a slot in the provided container.shortgetSlot()booleanbooleanbooleanisFilter()booleantoParent(ItemContainer parent, short start, ItemContainer container) Transforms this transactions data from referencing about a slot in the provided container to a slot in the provided parent.toString()booleanwasSlotModified(short slot)
-
Field Details
-
FAILED_ADD
-
-
Constructor Details
-
SlotTransaction
public SlotTransaction(boolean succeeded, @Nonnull ActionType action, short slot, @Nullable ItemStack slotBefore, @Nullable ItemStack slotAfter, @Nullable ItemStack output, boolean allOrNothing, boolean exactAmount, boolean filter)
-
-
Method Details
-
succeeded
public boolean succeeded()- Specified by:
succeededin interfaceTransaction
-
wasSlotModified
public boolean wasSlotModified(short slot) - Specified by:
wasSlotModifiedin interfaceTransaction
-
getAction
-
getSlot
public short getSlot() -
getSlotBefore
-
getSlotAfter
-
getOutput
-
isAllOrNothing
public boolean isAllOrNothing() -
isExactAmount
public boolean isExactAmount() -
isFilter
public boolean isFilter() -
toParent
@Nonnull public SlotTransaction toParent(ItemContainer parent, short start, ItemContainer container) Description copied from interface:TransactionTransforms this transactions data from referencing about a slot in the provided container to a slot in the provided parent.- Specified by:
toParentin interfaceTransaction- Returns:
- A transaction with data about the parent container.
-
fromParent
@Nullable public SlotTransaction fromParent(ItemContainer parent, short start, @Nonnull ItemContainer container) Description copied from interface:TransactionTransforms this transactions data from referencing about a slot in the provided parent to a slot in the provided container.- Specified by:
fromParentin interfaceTransaction- Returns:
- A transaction with data about the parent container or
nullif the transaction doesn't refer to the container at all.
-
toString
-