Class ResourceTransaction
java.lang.Object
com.hypixel.hytale.server.core.inventory.transaction.ListTransaction<ResourceSlotTransaction>
com.hypixel.hytale.server.core.inventory.transaction.ResourceTransaction
- All Implemented Interfaces:
Transaction
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ActionTypeprivate final booleanprivate final intprivate final booleanprivate final booleanprivate final intprivate final ResourceQuantityFields inherited from class com.hypixel.hytale.server.core.inventory.transaction.ListTransaction
EMPTY_FAILED_TRANSACTION, EMPTY_SUCCESSFUL_TRANSACTION -
Constructor Summary
ConstructorsConstructorDescriptionResourceTransaction(boolean succeeded, ActionType action, ResourceQuantity resource, int remainder, int consumed, boolean allOrNothing, boolean exactAmount, boolean filter, List<ResourceSlotTransaction> slotTransactions) -
Method Summary
Modifier and TypeMethodDescriptionfromParent(ItemContainer parent, short start, ItemContainer container) intintbooleanbooleanbooleanisFilter()toParent(ItemContainer parent, short start, ItemContainer container) toString()Methods inherited from class com.hypixel.hytale.server.core.inventory.transaction.ListTransaction
getEmptyTransaction, getList, size, succeeded, wasSlotModified
-
Field Details
-
action
-
resource
-
remainder
private final int remainder -
consumed
private final int consumed -
allOrNothing
private final boolean allOrNothing -
exactAmount
private final boolean exactAmount -
filter
private final boolean filter
-
-
Constructor Details
-
ResourceTransaction
public ResourceTransaction(boolean succeeded, @Nonnull ActionType action, @Nonnull ResourceQuantity resource, int remainder, int consumed, boolean allOrNothing, boolean exactAmount, boolean filter, @Nonnull List<ResourceSlotTransaction> slotTransactions)
-
-
Method Details
-
getAction
-
getResource
-
getRemainder
public int getRemainder() -
getConsumed
public int getConsumed() -
isAllOrNothing
public boolean isAllOrNothing() -
isExactAmount
public boolean isExactAmount() -
isFilter
public boolean isFilter() -
toParent
@Nonnull public ResourceTransaction toParent(ItemContainer parent, short start, ItemContainer container) - Specified by:
toParentin interfaceTransaction- Overrides:
toParentin classListTransaction<ResourceSlotTransaction>
-
fromParent
@Nullable public ResourceTransaction fromParent(ItemContainer parent, short start, @Nonnull ItemContainer container) - Specified by:
fromParentin interfaceTransaction- Overrides:
fromParentin classListTransaction<ResourceSlotTransaction>
-
toString
- Overrides:
toStringin classListTransaction<ResourceSlotTransaction>
-