# Item Blacklist

### Item Components from 1.21.4

From 1.21.3/1.21.4 version, items are defined by a type and a set of components that depend on the type of the item

For example a firework rocket with flight\_duration=3. It's <mark style="color:$warning;">data string</mark> will be\ <mark style="color:yellow;">`minecraft:firework_rocket`</mark><mark style="color:blue;">`[minecraft:fireworks={flight_duration:3b}]`</mark>

The yellow part is the type and the blue one are the components

You can see the "data string" of an object with the command <mark style="color:$warning;">`/zeltrade inspect`</mark> with the item you want to inspect on the main hand

### Config Section

{% code title="config.yml" %}

```yaml
blacklistedItemRegexes:
- regex: '.*flight_duration: 3b.*'
  containsOnly: false
- regex: 'flight_duration: 3b'
  containsOnly: true
- regex: 'diamond_sword' #To ban all diamond swords from trades
  containsOnly: true
```

{% endcode %}

<mark style="color:orange;">`containsOnly`</mark> -> If on **true**, the string inside regex will be checked with **contains()** instead of the regex pattern. <mark style="color:$success;">This is</mark> <mark style="color:$success;">**much more efficient**</mark> <mark style="color:$success;">than checking a regex</mark>

<mark style="color:orange;">regex</mark> -> You can create a regex to match the item data string. If matched, the item will be denied from being put inside the trade GUI. To create your regex you can use <https://regex101.com/>

<mark style="color:red;">**Recommendations**</mark> : use less regex possible (<mark style="color:$warning;">containsOnly: false</mark>) and if you have many regexes,\
put the simpler regexes at the beginning so they get matched before the complex ones, because checks are all made on the main thread.\
Simple regexes typically take half a millisecond while contains checks require microseconds
