aboutsummaryrefslogtreecommitdiffstats
path: root/docs/task-types/itemdamaging-(task-type).md
blob: dd91e7ec1aa2e65a71fc418babcd73b9c3e60fb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
---
title: itemdamaging
parent: Built-in task types
grand_parent: Task types
---

# itemdamaging (task type)

Since v3.15.1
{: .label .label-green }

Damage certain items with a set amount of damage (by reducing durability).

## Options

| Key           | Description                                            | Type                   | Required | Default | Notes                                                                                                                                                                                                                                                                        |
|---------------|--------------------------------------------------------|------------------------|----------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `amount`      | The number of damage to damage the item.               | Integer                | Yes      | \-      | \-                                                                                                                                                                                                                                                                           |
| `item`        | The specific item to damage.                           | Material, or ItemStack | No       | \-      | Accepts standard [item definition](../configuration/defining-items). Please see [this list](https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html) (1.13+) or [this list](https://helpch.at/docs/1.12.2/org/bukkit/Material.html) (1.8-1.12) for material names. |
| `data`        | The data code for the item.                            | Integer                | No       | 0       | This field is not used in Minecraft versions 1.13+, nor is it compatible with ItemStack definitions.                                                                                                                                                                         |
| `exact-match` | Whether the item should exactly match what is defined. | Boolean                | No       | true    | \-                                                                                                                                                                                                                                                                           |
| `worlds`      | Worlds which should count towards the progress.        | List of world names    | No       | \-      | \-                                                                                                                                                                                                                                                                           |

## Examples

Damage diamond pickaxes with 12000 points of damage:

``` yaml
itemdamaging:
  type: "itemdamaging"
  amount: 12000           # amount of damage to damage the item
  item: DIAMOND_PICKAXE   # item to damage
  exact-match: false      # we need to ignore nbt
```