# 📚 Collections

The **Collections Module** allows players to progress by collecting specific materials, unlocking rewards at different milestones. It features a customizable progress bar and supports aliases for compact tracking.

Players can view their collections by using `/collections`. This opens a menu displaying all items they've collected.

<figure><img src="https://3588988794-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL6MVyB9FzPcSAmJ9fZ0x%2Fuploads%2F9r8ZcTlEQIBD581l8avC%2FCollections.gif?alt=media&#x26;token=147db535-bcf1-4084-9a8d-5b3210baafa4" alt=""><figcaption></figcaption></figure>

#### Progress Bar Configuration

The module includes a configurable progress bar to visually display collection progress.

```yaml
Progress Bar:
  Char: "▋"
  Completed Color: "§a"
  Uncompleted Color: "§7"
  Length: 20
  Format: "§7Progress: §e<progress_bar> §7<progress>§7%"
  Use Custom Texture: false

  Negative Shift 1: "neg_shift_1_char"
  Start Char Filled: "progressbar_start_char"
  Filled Fill Char: "progressbar_filled_char"
  End Char Filled: "progressbar_end_char"
  Start Char Unfilled: "progressbar_start_char"
  Unfilled Fill Char: "progressbar_unfilled_char"
  End Char Unfilled: "progressbar_end_char"
  Custom Bar Format: "<neg_shift_1_char><progress_char><neg_shift_1_char>"
```

* **Char**: The symbol used for the progress bar.
* **Completed Color / Uncompleted Color**: Colors for filled and unfilled sections.
* **Length**: Determines how many characters are used.
* **Format**: Defines how progress is displayed.
* **Custom Texture**: Allows for pixel-perfect progress bars using a negative shift.

#### Block Aliases

Aliases allow certain blocks to contribute to different collections.

```yaml
Aliases:
  COAL_BLOCK: 'COAL:9'
  IRON_BLOCK: 'IRON_INGOT:9'
  IRON_ORE: 'IRON_INGOT:1'
  GOLD_BLOCK: 'GOLD_INGOT:9'
  DIAMOND_BLOCK: 'DIAMOND:9'
  EMERALD_BLOCK: 'EMERALD:9'
  REDSTONE_BLOCK: 'REDSTONE:9'
  LAPIS_BLOCK: 'LAPIS_LAZULI:9'
```

* This setup ensures that breaking a **COAL\_BLOCK** counts as collecting **9 COAL**, while **IRON\_ORE** contributes **1 IRON\_INGOT**.

#### Example Collections

**Cobblestone Collection**

```yaml
COBBLESTONE:
  Name: '§7Cobblestone'
  Levels:
    '1':
      Amount: 500
      Rewards Lore:
        - '§7- §e$100'
        - '§7- §eEfficiency 1'
      Rewards:
        - 'COMMAND:eco give <player> 100'
        - 'UNLOCKS:ENCHANT:efficiency:1'
    '2':
      Amount: 1000
      Rewards Lore:
        - '§7- §e$200'
      Rewards:
        - 'COMMAND:eco give <player> 200'
    '3':
      Amount: 2000
      Rewards Lore:
        - '§7- §e$500'
        - '§7- §eUnbreaking 2'
      Rewards:
        - 'COMMAND:eco give <player> 500'
        - 'UNLOCKS:ENCHANT:unbreaking:2'
```

* Players unlock **money** and **enchantments** as they progress.

**Deepslate Collection**

```yaml
DEEPSLATE:
  Name: '§8Deepslate'
  Levels:
    '1':
      Amount: 500
      Rewards Lore:
        - '§7- §e$100'
        - '§7- §eUnbreaking 1'
      Rewards:
        - 'COMMAND:eco give <player> 100'
        - 'UNLOCKS:ENCHANT:unbreaking:1'
    '5':
      Amount: 5000
      Rewards Lore:
        - '§7- §e$2000'
        - '§7- §eUnbreaking 3'
      Rewards:
        - 'COMMAND:eco give <player> 2000'
        - 'UNLOCKS:ENCHANT:unbreaking:3'
```

* Higher levels grant better rewards, including **Unbreaking 3**.

#### Summary

* Players collect materials to unlock **money** and **enchants**.
* A **progress bar** visually tracks collection milestones.
* **Aliases** ensure compact tracking across different block types.
