Class CraftRecipeAction


public class CraftRecipeAction extends ItemStackAction
  • Constructor Details

    • CraftRecipeAction

      public CraftRecipeAction(int reqId, int recipeId)
  • Method Details

    • isValid

      public boolean isValid(CloudPlayer player)
      Description copied from class: InventoryAction
      Returns whether this action is currently valid. This should perform any necessary sanity checks.
      Specified by:
      isValid in class InventoryAction
      Parameters:
      player - player
      Returns:
      valid
    • execute

      public boolean execute(CloudPlayer player)
      Description copied from class: InventoryAction
      Performs actions needed to complete the inventory-action server-side. Returns if it was successful. Will return false if plugins cancelled events. This will only be called if the transaction which it is part of is considered valid.
      Specified by:
      execute in class InventoryAction
      Parameters:
      player - player
      Returns:
      successfully executed
    • onAddToTransaction

      public void onAddToTransaction(InventoryTransaction transaction)
      Description copied from class: InventoryAction
      Called when the action is added to the specified InventoryTransaction.
      Overrides:
      onAddToTransaction in class ItemStackAction
      Parameters:
      transaction - to add
    • onExecuteSuccess

      public void onExecuteSuccess(CloudPlayer source)
      Description copied from class: InventoryAction
      Performs additional actions when this inventory-action completed successfully.
      Overrides:
      onExecuteSuccess in class ItemStackAction
      Parameters:
      source - player