Class SlotTransaction
java.lang.Object
com.hypixel.hytale.server.core.inventory.transaction.SlotTransaction
- All Implemented Interfaces:
Transaction
- Direct Known Subclasses:
ItemStackSlotTransaction,MaterialSlotTransaction,ResourceSlotTransaction,TagSlotTransaction
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ActionTypeprivate final booleanprivate final booleanstatic final SlotTransactionprivate final booleanprivate final ItemStackprivate final shortprivate final ItemStackprivate final ItemStackprivate final boolean -
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) shortgetSlot()booleanbooleanbooleanisFilter()booleantoParent(ItemContainer parent, short start, ItemContainer container) toString()booleanwasSlotModified(short slot)
-
Field Details
-
FAILED_ADD
-
succeeded
private final boolean succeeded -
action
-
slot
private final short slot -
slotBefore
-
slotAfter
-
output
-
allOrNothing
private final boolean allOrNothing -
exactAmount
private final boolean exactAmount -
filter
private final boolean filter
-
-
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) - Specified by:
toParentin interfaceTransaction
-
fromParent
@Nullable public SlotTransaction fromParent(ItemContainer parent, short start, @Nonnull ItemContainer container) - Specified by:
fromParentin interfaceTransaction
-
toString
-