Interface Transaction

All Known Implementing Classes:
ClearTransaction, ItemStackSlotTransaction, ItemStackTransaction, ListTransaction, MaterialSlotTransaction, MaterialTransaction, MoveTransaction, ResourceSlotTransaction, ResourceTransaction, SlotTransaction, TagSlotTransaction, TagTransaction

public interface Transaction
Since:
18/3/17.
Version:
1.0
  • Method Details

    • succeeded

      boolean succeeded()
    • wasSlotModified

      boolean wasSlotModified(short slot)
    • toParent

      @Nonnull Transaction toParent(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.
      Returns:
      A transaction with data about the parent container.
    • fromParent

      @Nullable Transaction fromParent(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.
      Returns:
      A transaction with data about the parent container or null if the transaction doesn't refer to the container at all.