Function consumeAmount

  • Edit the amount of an ItemStack.

    Parameters

    • item: ItemStack

      The ItemStack.

    • value: number

      The amount to be removed.

    Returns ItemStack | undefined

    the new ItemStack.

    SapiError if amount is not enough to be removed.

    SapiError if max amount is not high enough.