setQuantity should work fine. Perhaps you could give us more context for what you’re doing (and provide code samples).
For example, if the ItemStack came from an inventory, you need to give the inventory the new item stack back (because inventories deal with copies of stacks).
That was the main problem, but I’m not sure how to offer the ItemStack.
player.getInventory().offer(stack.setQuantity(stack.getQuantity() - 1)); was my main idea but it says “The method offer(ItemStack) in the type Inventory is not applicable for the arguments (void)”. I’ve tried creating a new ItemStack() but that doesn’t change anything.