> For the complete documentation index, see [llms.txt](https://opuszek.gitbook.io/itemblocker/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://opuszek.gitbook.io/itemblocker/features/scanning.md).

# Scanning existing items

Rules stop new actions. Items players got before a rule existed stay where they are. A scan finds them, which is useful when you add rules to a server that has been running for months.

```
/ib scan players [remove|confiscate] [actions:...]
/ib scan containers [remove|confiscate] [actions:...] [radius:<chunks>] [world:<name>]
```

It needs `itemblocker.scan`.

## What is scanned

| Target       | Checks                                                                                                                                                                         |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `players`    | the inventory, armor, off hand and ender chest of every online player                                                                                                          |
| `containers` | chests, barrels, shulker boxes, hoppers and other containers in loaded chunks around you (`radius:`, 4 chunks by default, at most 16), or in a whole world with `world:<name>` |

From the console, `containers` needs `world:`.

## What counts as forbidden

By default, an item that players may not pick up, or that carries a [blocked enchantment](/itemblocker/rules/enchantments.md). Use `actions:` to count other actions:

```
/ib scan players actions:use,place
/ib scan containers world:world actions:all
```

Players' own bypass permissions and exceptions apply.

## Report first

Without `remove` or `confiscate`, the scan only reports what it found, grouped by player or container, item and preset:

```
Forbidden items in players: 3
 • Steve: 8x TNT (default)
 • Alex: 1x Netherite Sword (pvp)
Add remove or confiscate to the command to take them away.
```

Then run it again with:

* `remove` to delete the items,
* `confiscate` to move them to `confiscated.yml`.

## Confiscated items

```
/ib confiscated                     # who had items taken, and how many stacks
/ib confiscated take <owner>        # give them to you
```

The owner is a player name, or the location of a container such as `world 120 64 -30`. Items that do not fit into your inventory are dropped at your feet. [Enchantments in `confiscate` mode](/itemblocker/rules/enchantments.md) put their items here too.

## Folia

Scans run on the thread that owns each player and chunk, so they also work on Folia.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://opuszek.gitbook.io/itemblocker/features/scanning.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
