Class InventoryTransaction

java.lang.Object
cn.nukkit.inventory.transaction.InventoryTransaction
Direct Known Subclasses:
CraftingTransaction, EnchantTransaction, GrindstoneTransaction, RepairItemTransaction, SmithingTransaction, TradingTransaction

public class InventoryTransaction extends Object
Author:
CreeperFace
  • Field Details

  • Constructor Details

  • Method Details

    • init

      protected void init(Player source, List<InventoryAction> actions)
    • getSource

      public Player getSource()
    • getCreationTime

      public long getCreationTime()
    • getInventories

      public Set<Inventory> getInventories()
    • getActionList

      @Since("1.3.0.0-PN") public List<InventoryAction> getActionList()
    • getActions

      public Set<InventoryAction> getActions()
    • addAction

      public void addAction(InventoryAction action)
    • addInventory

      public void addInventory(Inventory inventory)
      This method should not be used by plugins, it's used to add tracked inventories for InventoryActions involving inventories.
      Parameters:
      inventory - to add
    • matchItems

      protected boolean matchItems(List<Item> needItems, List<Item> haveItems)
    • sendInventories

      protected void sendInventories()
    • canExecute

      public boolean canExecute()
    • callExecuteEvent

      protected boolean callExecuteEvent()
    • execute

      @PowerNukkitDifference(since="1.4.0.0-PN", info="Always returns false if the execution is not possible") public boolean execute()
    • hasExecuted

      public boolean hasExecuted()