> 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/developers/building.md).

# Building from source

You need Java 21 to build. The plugin itself is compiled for Java 16.

```bash
git clone https://github.com/kuqk/ItemBlocker.git
cd ItemBlocker
./gradlew build
```

The jar is written to `build/libs/ItemBlocker-<version>.jar`.

## Useful tasks

| Task                            | Does                                               |
| ------------------------------- | -------------------------------------------------- |
| `./gradlew test`                | Runs the tests, on a mock server                   |
| `./gradlew runServer`           | Starts a Paper 1.21.11 test server with the plugin |
| `./gradlew runServer -Pmc=26.3` | The same with another Minecraft version            |

## Layout

| Folder             | Contains                                                                      |
| ------------------ | ----------------------------------------------------------------------------- |
| `src/main`         | The plugin, compiled against the Spigot API so it runs on every platform      |
| `src/paper`        | Extras for Paper and its forks, such as the Folia schedulers                  |
| `src/integrations` | Hooks into WorldGuard and PlaceholderAPI, loaded only when they are installed |
| `src/modern`       | Listeners for events of newer versions, such as the 1.21 crafter              |
| `docs`             | This documentation                                                            |

Continuous integration checks every pull request against the Spigot and Paper APIs of every supported version, from 1.17 to 26.3, so the jar keeps loading everywhere.

## Contributing

Issues and pull requests are welcome on [GitHub](https://github.com/kuqk/ItemBlocker).


---

# 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/developers/building.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.
