# Configuration

## Storage

* **Storage**: Choose storage type in `JSON`, `SQLITE` and `MYSQL`
* **UpdateInterval**: Allows to update the data

```yaml
# Change the storage type of the plugin.
#
# Here are the types of storage available:
# - JSON, a JSON file that will contain all the plugin data, for small and medium servers
# - SQLITE, use of a database, for large servers
# - MYSQL, use of a database, for large servers
#
storage: JSON

# Updates data every 120,000 milliseconds (2 minutes).
# If the storage is in JSON, then the file will save
# If the storage is SQLITE or MYSQL then the drawers will be updated if they need to be
updateInterval: 120000

# Configuration for SQLITE and MYSQL storage
sql:
  # Table name
  tableName: "zdrawers"
  user: homestead
  password: secret
  port: 3306
  host: 192.168.10.10
  database: zauctionhouse
```

## Drawer

* **Type**: Specifies the drawer type (`SINGLE`, `DUO`, `TRIO`, `QUAD`).
* **Limit**: The maximum number of items a single drawer can hold.
* **EnableHopper**: Whether or not the drawer interacts with hoppers.
* **DropContent**: Settings for dropping items when the drawer is broken.
  * **Enable**: Enables or disables dropping of contents.
  * **Limit**: Maximum items allowed for the drawer to be breakable.

```yaml
type: SINGLE # Drawer type, available types are: SINGLE, DUO, TRIO and QUAD
limit: 2048 # The global limit for the number of items a single drawer can hold.

# Enable or disable interaction with hopper
enableHopper: true

# Drop items to the floor when the drawer is broken.
dropContent:
  enable: false # Enable or disable this option
  limit: 1024 # If there are more than 1024, the drawer cannot be broken, it should be empty before it can be broken.
```

### Display Settings

Configure items for drawer display entities.

* **ViewRange**: Distance for displaying entities related to the drawer.
* **EnableTextBackground**: Enables or disables background behind text display.

```yaml
# Change distance to display entities
viewRange: 0.5

# Enable or disable background behind text display
enableTextBackground: false
```

### Item Configuration

You can configure the item that the player will have in his inventory. The configuration of the items is that of the zMenu plugin, you can use all the information in the documentation here: <https://docs.zmenu.dev/configurations/items>

```yaml
item:
  material: BARREL
  name: "#22f54cᴅʀᴀᴡᴇʀ"
  lore:
    - "&8&oStore a large number of the same item"
    - ""
    - "#e3e3e3Content&8: #baffffx%zdrawer_amount_formatted_0% %zdrawer_content_0%"
    - "#e3e3e3Upgrade&8: #baffff%zdrawer_upgrade%"
```

### Border Settings

You can apply a border to your drawer. The border will be on the front hard drawer.

* **Enable**: Toggles the display of borders around the drawer.
* **Scale**: Adjusts the scale of itemDisplay entities.
* **Item**: Item configuration

```yaml
border:
  enable: true # Enable or disable the option
  scale: # Allows you to change the scale of the itemDisplay entity, changing its values can break the display, done only if you know what you are doing.
    up: { x: 1.0, y: 0.05, z: 0.05 }
    down: { x: 1.0, y: 0.05, z: 0.05 }
    left: { x: 0.05, y: 0.9, z: 0.05 }
    right: { x: 0.05, y: 0.9, z: 0.05 }
  # Item that will be displayed, you can use the zMenu documentation: https://docs.zmenu.dev/configurations/items
  item:
    material: SPRUCE_WOOD
```

### Crafting Settings

You can activate a craft for the drawer.

* **Enable**: Enables or disables crafting for the drawer.
* **Shade**: Defines the crafting pattern.
* Indredients: The ingredients that were used in the shade.

```yaml
craft:
  enable: true # Enable or disable the craft
  shade: # The craft shade
    - "ABA"
    - "BCB"
    - "ABA"
  ingredients: # Ingredients of craft
    A: # you can use the zMenu documentation: https://docs.zmenu.dev/configurations/items
      material: SPRUCE_WOOD
    B: # you can use the zMenu documentation: https://docs.zmenu.dev/configurations/items
      material: SPRUCE_PLANKS
    C: # you can use the zMenu documentation: https://docs.zmenu.dev/configurations/items
      material: CHEST
```

***

## Number Formatting

Settings for displaying large numbers in a more readable format.

* **Display**: Allows the use of colors to display text if number format is disable.
* **Enable**: Toggles custom number formatting.
* **Formats**: All the formats the plugin will use

```yaml
# Number formatting settings for displaying large numbers in a more readable format.
numberFormat:
  # Allows you to use colors to display text, works with MiniMessage: https://docs.advntr.dev/minimessage/format.html
  display: "&f%amount%"
  # Toggle to enable/disable custom number formatting.
  enable: false
  # Documentation for String format: https://www.geeksforgeeks.org/java-string-format-method-with-examples/
  formats:
    - format: "" # Blank format to display text directly
      maxAmount: 1000
      # Add colors to text display, works with MiniMessage
      # display: "<gradient:#1cfc03:#2bd66f>%amount%"
    - format: "%.1fK"
      maxAmount: 1000000
      # display: "<gradient:#7bd62b:#a3d14d>%amount%"
    - format: "%.1fM"
      maxAmount: 1000000000
      # display: "<gradient:#ebe123:#ebbc23>%amount%"
    - format: "%.1fB"
      maxAmount: 1000000000000
      # display: "<gradient:#eb8023:#eb4b23>%amount%"
    - format: "%.2fT"
      maxAmount: 1000000000000000
    - format: "%.2fQ"
      maxAmount: 1000000000000000000
```

***

## Upgrades

Details on available upgrades for the drawer, including material changes and increased item limits.

***

For more detailed item configuration, refer to the [zMenu documentation](https://docs.zmenu.dev/configurations/items).


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://zdrawer.groupez.dev/configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
