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

# Welcome

Welcome to the CraftVentory wiki.

### What is CraftVentory? <a href="#fastinventory" id="fastinventory"></a>

**CraftVentory** is a **Java** / **Spigot** library that facilitates the development of **Minecraft inventories**. It enables **developers** to define **fully configurable** inventories in **configuration files** and provide them with **Java code** in **their plugins**.

This library was developed to facilitate the development of in-game inventories. Indeed, making them **fully configurable** is an important feature for **server administrators** but this process is very tedious without an appropriate tool. CraftVentory solves this problem by providing a lot of **built-in features** to help **developers** implement **fully customizable** inventories very easily.

### Features <a href="#features" id="features"></a>

**CraftVentory** comes with the following features:

* Fully customizable **inventories** / **items** / **paginations** from configuration files (**YAML** support).
* Fully customizable **actions** when **clicking** on **items** like sending messages / sounds, executing commands, inventory navigation, etc.
* **Paginations** to paginate a large list of results in an inventory.
* **Placeholders** to display custom values in texts (inventory title, item name / lore, etc.).
* **Inventory history** to enable players to easily navigate between inventories (home, backward, forward).
* **I18n** support.
* **Enhancements** to dynamically modify inventory properties with **Java code**.
* **Hooks** to execute custom **Java code** for an inventory when specific **events** happen.

### Setup

To use CraftVentory, you can directly include the JAR file as a dependency of your plugin. This JAR file can be downloaded on the [Releases page](https://github.com/Syr0ws/CraftVentory/releases) of the GitHub repository of the project.

The library can also be included in your project by using a dependency manager like **Maven** or **Gradle**.

{% tabs %}
{% tab title="Maven" %}

```xml
<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>

<dependency>
    <groupId>com.github.Syr0ws</groupId>
    <artifactId>CraftVentory</artifactId>
    <version>{VERSION}</version>
    <scope>compile</scope>
</dependency>
```

{% endtab %}

{% tab title="Gradle" %}

```gradle
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        mavenCentral()
        maven { url 'https://jitpack.io' }
    }
}

dependencies {
    implementation 'com.github.Syr0ws:CraftVentory:{VERSION}'
}
```

{% endtab %}
{% endtabs %}

After being added as a dependency, you must initialize the library by following this [tutorial](https://syrows-development.gitbook.io/craftventory/get-started/initialize-the-library).

### Useful links <a href="#useful-links" id="useful-links"></a>

* [GitHub](https://github.com/Syr0ws/CraftVentory)
* [Spigot](https://www.spigotmc.org/resources/craftventory-create-configurable-inventories-1-17.119850/)
* [Discord](https://discord.gg/sPUSHb2xDK)

### Example <a href="#useful-links" id="useful-links"></a>

<div align="left"><figure><img src="https://3183564674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLIfunoI7tSFeHLmFpoUY%2Fuploads%2FXlZr8LiBVoXEtsuzPxnq%2Fsimple-inventory-example.gif?alt=media&amp;token=8ff1399b-3f78-4a52-9211-c6f73ae1711a" alt=""><figcaption></figcaption></figure></div>

**Configuration :**

```yaml
inventory-id: "warp-inventory"

type: "CHEST_9x6"

title: "&6Warps"

pattern:
  - "OOOOOOOOO"
  - "OYYWWWYYO"
  - "OY1W2W3YO"
  - "OYW4W5WYO"
  - "OYYWWWYYO"
  - "OOOOOOOOC"

content:
  orange-stained-glass:
    item:
      type: ORANGE_STAINED_GLASS_PANE
      display-name: " "
    symbol: "O"
  yellow-stained-glass:
    item:
      type: YELLOW_STAINED_GLASS_PANE
      display-name: " "
    symbol: "Y"
  white-stained-glass:
    item:
      type: WHITE_STAINED_GLASS_PANE
      display-name: " "
    symbol: "W"
  warp-world:
    item:
      type: GRASS_BLOCK
      display-name: "&aOverworld"
      lore:
        - ""
        - "&fClick to be teleported to the overworld."
    symbol: "1"
    actions:
      - action: "CLOSE"
      - action: "PLAYER_COMMAND"
        command: "warp overworld"
  warp-nether:
    item:
      type: NETHERRACK
      display-name: "&cNether"
      lore:
        - ""
        - "&fClick to be teleported to the nether."
    symbol: "2"
    actions:
      - action: "CLOSE"
      - action: "PLAYER_COMMAND"
        command: "warp nether"
  warp-end:
    item:
      type: END_STONE
      display-name: "&5End"
      lore:
        - ""
        - "&fClick to be teleported to the End."
    symbol: "3"
    actions:
      - action: "CLOSE"
      - action: "PLAYER_COMMAND"
        command: "warp end"
  warp-mining:
    item:
      type: "IRON_ORE"
      display-name: "&7Mining"
      lore:
        - ""
        - "&fClick to be teleported to the mining world."
    symbol: "4"
    actions:
      - action: "CLOSE"
      - action: "PLAYER_COMMAND"
        command: "warp mining"
  warp-enchant:
    item:
      type: ENCHANTING_TABLE
      display-name: "&5Enchantment"
      lore:
        - ""
        - "&fClick to be teleported to the enchantment room."
    symbol: "5"
    actions:
      - action: "CLOSE"
      - action: "PLAYER_COMMAND"
        command: "warp enchant"
  close:
    item:
      type: BARRIER
      display-name: "&cClose"
    symbol: "C"
    actions:
      - action: "CLOSE"
```


---

# 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://syrows-development.gitbook.io/craftventory/welcome.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.
