# Config

The plugin is managed entirely through 4 files: `config.yml` , `messsages.yml,` `gui.yml` and `settings.yml`. Below is an explanation of how to use each config file.

### Example config.yml

```yaml
# =======================================================
# AliienChatColor - Config
# =======================================================
colors:
  # The name of the color (does not change anything on its own, but also dont mess with this on colors that people are actively using)
  pastel_pink:
    # The prefix/colors of your chat color
    color: "<#FFB6C1>"
    # The required permission to use your chat color
    permission: "aliien.color.pastel_pink"
    # GUI settings
    gui:
      # Displayed material in the GUI
      material: PINK_DYE
      # Slot where this item is being displayed (make sure that none are overlapping)
      slot: 0
      # Page where your chat color will be
      page: 1
      # Display name of the color in the GUI (does not affect the chat color in the messages at all)
      name: "<#FFB6C1><bold>Pastel Pink"
      # Custom Model Data for resource packs (Set to 0 or remove this option for none)
      model-data: 0
      # List of Bukkit ItemFlags to hide (e.g., HIDE_ATTRIBUTES)
      item-flags: []
      # Individual lore overrides (Leave empty or remove to use global lores in gui.yml)
      lore: []
      lore-without-perm:
        - "<dark_gray>▪ <gray>Customize your chat appearance"
        - "<gray>  with this beautiful color."
        - ""
        - "  <dark_gray>» <white>Preview:"
        - "    %example_text%"
        - ""
        - "<red>✖ <#ff7c7c>Click to purchase this color for %price%$!"
    # NEW: Purchasable example (remove this section if you don't want it to be purchasable, or set "enabled" to false)
    price:
      enabled: true
      # Check the documentation for the types of currency you can use
      currency: "VAULT"
      # Amount of money required to buy
      amount: 1000.0
      
  # Example of a color with a multiple-color gradient
  grad_pink_lemonade:
    color: "<gradient:#FFB6C1:#FDFD96>"
    permission: "aliien.color.grad.pink_lemonade"
    gui:
      material: GLISTERING_MELON_SLICE
      slot: 20
      page: 1
      name: "<gradient:#FFB6C1:#FDFD96><bold>Pink Lemonade"
      
# 50 default chat colors are automatically generated in the config file
# if you using the PREMIUM VERSION of the plugin

# DO NOT under any circumstance touch this unless you are told to by the official support
config-version: 1
```

### Example messages.yml

```yml
# =======================================================
# AliienChatColor - Messages
# =======================================================
messages:
  # Prefix applied to all the messages (set to "" or remove if you don't want this)
  prefix: ""
  # If the player tried to use an invalid color
  invalid-color: "<red>Sorry, that color is invalid/doesn't exist!"
  # If the player successfully equips a chat color
  success: "<green>You have successfully updated your chat color!"
  # If a command is not used correctly
  incorrect-cmd-usage: "<red>This command was not used correctly!"
  # If a player does not have permission to use a command
  no-perms: "<red>You do not have permission to use this!"
  # If the plugin is successfully reloaded
  reload: "<green>AliienChatColor has been reloaded!"
  # If there was an error while reloading the plugin
  fail-reload: "<red>There was an error while reloading AliienChatColor (please check the console and report the bug)"
  # If a chat color is cleared/removed
  clear-color: "<green>You have successfully cleared the chat color!"
  # If a player does not type a valid hex color in the '/cc hex' command
  not-valid-hex: "<red>Invalid hex format! Example: #00ffcc"
  # If a player is not found through a command execution
  invalid-player: "<red>This player does not exist or has never joined the server before!"
  # If there is a new version available
  new-version: "<green>A new AliienChatColor version is now available!"
  # If the player doesn't have enough money to buy a color
  insufficient-funds: "<red>You do not have enough funds to buy the %color% </bold><red>color! <gray>(Amount: %amount%)"
  # If the economy defined is not available (economy plugin disabled, not hooked, internal error, etc)
  eco-unavailable: "<red>The currency for this color is currently not available! <gray>(This might be a bug)"
  # If a player successfully purchases a color
  purchase-success: "<green>You successfully bought the %color% </bold><green>color for %amount%$!"

# DO NOT under any circumstance touch this unless you are told to by the official support
config-version: 3
```

### Example gui.yml

```yaml
# =======================================================
# AliienChatColor - Gui
#
# Everything relating to the chat colors (including the GUI settings for them)
# are handled in the config.yml file. This is exclusive for the action items and GUI settings
# =======================================================
gui:
  # The title of the GUI
  title: "<dark_gray>Colors - Page %page%"
  # The amount of rows of the GUI
  rows: 6
  # Item that will be displayed for the colors that the player does not have
  no-access-item: BARRIER
  # Text that will replace the %example_text% placeholder
  example-text-word: "Example Text"
  # Global lores for all the GUI color items (available placeholders: %example_text%)
  global-lore-has-perm: # If the player has access to the color
    - "<dark_gray>▪ <gray>Customize your chat appearance"
    - "<gray>  with this beautiful color."
    - ""
    - "  <dark_gray>» <white>Preview:"
    - "    %example_text%"
    - ""
    - "<green>✦ <#a8ff9e>Click to equip this color!"
  global-lore-no-perm: # If the player does not have access to the color
    - "<dark_gray>▪ <gray>Customize your chat appearance"
    - "<gray>  with this beautiful color."
    - ""
    - "  <dark_gray>» <white>Preview:"
    - "    %example_text%"
    - ""
    - "<red>✖ <#ff7c7c>You do not own this color!"

# Action items (available actions: PREVIOUS_PAGE, NEXT_PAGE, CLEAR, NONE)
items:
  previous-page:
    action: PREVIOUS_PAGE
    material: ARROW
    slots: [45] # You can introduce multiple slots here (e.g.: [45, 46, 47])
    name: "<#ffb347><b>« Previous Page</b>"
    lore:
      - "<dark_gray>▪ <gray>Navigate back to the"
      - "<gray>  previous page of colors."
      - ""
      - "  <dark_gray>» <white>Target:"
      - "    Page %target_page%"
      - ""
      - "<#ffb347>« <yellow>Click to go back!"
  next-page:
    action: NEXT_PAGE
    material: ARROW
    slots: [53]
    name: "<#ffb347><b>Next Page »</b>"
    lore:
      - "<dark_gray>▪ <gray>Navigate forward to the"
      - "<gray>  next page of colors."
      - ""
      - "  <dark_gray>» <white>Target:"
      - "    Page %target_page%"
      - ""
      - "<#ffb347>» <yellow>Click to continue!"
  clear-button:
    action: CLEAR
    material: BARRIER
    slots: [49]
    name: "<#ff4c4c><b>Reset Chat Color</b>"
    lore:
      - "<dark_gray>▪ <gray>Remove your current chat color"
      - "<gray>  and return to the default."
      - ""
      - "  <dark_gray>» <white>Status:"
      - "    Clear Color"
      - ""
      - "<#ff4c4c>✖ <red>Click to reset!"
  gray-filler:
    action: NONE
    material: GRAY_STAINED_GLASS_PANE
    slots: [36, 37, 38, 39, 40, 41, 42, 43, 44]
    name: " "
    lore: []

# DO NOT under any circumstance touch this unless you are told to by the official support
config-version: 2
```

### Example settings.yml

```yaml
# =======================================================
# AliienChatColor - Settings
# =======================================================

# Should the plugin check/notify for new updates?
# Requires a reboot
check-for-updates: true

# The priority of the chat listener - requires a reboot
# (Don't mess with this if you don't know what you're doing)
# Valid options: LOWEST, LOW, NORMAL, HIGH, HIGHEST, MONITOR
chat-listener-priority: HIGHEST

# Toggle the hooks
hooks:
  placeholder-api:
    enabled: true
  # NEW: Economy hooks
  vault: # Keep this enabled if you are using the economy feature, even if you aren't using vault as a currency
    enabled: true
  experience: # This isn't a plugin, but by disabling this you avoid it being saved as a purchase option for no reason
    enabled: false
  player-points:
    enabled: false
  ultra-economy:
    enabled: false
    currencies: []
  coins-engine: # Legacy version of ExcellentEconomy, may not work correctly on newer minecraft versions
    enabled: false
    currencies: []
  excellent-economy:
    enabled: false
    currencies: []
  eco-bits:
    enabled: false
    currencies: []
  royale-economy:
    enabled: false
  redis-economy:
    enabled: false
    currencies: []
  # Here you can set your own custom currency, even if it is not officially supported
  # Requires PlaceholderAPI
  custom-economy:
    enabled: false
    currencies:
      vote_tokens: # Custom currency example
        balance-placeholder: "%vote_balance%" # This has to be an unformatted placeholder (just the raw number)
        withdraw-command: "vote take %player% %amount%" # This has to be a command (use %player% and %amount% placeholders)

# Sounds settings
sounds:
  # If you set this to false you can ignore everything else in this sounds section
  enabled: true

  # Format: "sound_name:volume:pitch"
  # You can use "NONE" if you want to disable a specific sound
  # You can use Vanilla sounds or Custom Resource Pack sounds natively!

  click: "UI_BUTTON_CLICK:1.0:1.0"
  success: "ENTITY_PLAYER_LEVELUP:1.0:1.0"
  error: "ENTITY_VILLAGER_NO:1.0:1.0"
  clear: "ENTITY_EXPERIENCE_ORB_PICKUP:1.0:0.5"

# NEW: Logs successful purchases into a .txt file inside the plugin folder
purchase-logging:
  enabled: true
  file-name: "logs.txt"

# Define how you want to store player data
# Available options: MYSQL, SQLITE, PDC (PDC isn't a database)
# Changing this requires a reboot
# If you are unsure which one to pick feel free to contact me for guidance!
storage:
  type: SQLITE
  # If you are not using MySQL this section is completely irrelevant
  mysql:
    host: "localhost"
    port: 3306
    database: "server"
    username: "root"
    password: "password"
    advanced:
      max-pool-size: 10
      min-idle: 10
      connection-timeout: 10000
      max-lifetime: 1800000

# DO NOT under any circumstance touch this unless you are told to by the official support
config-version: 3
```


---

# 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://aliien.gitbook.io/aliien-docs/aliienchatcolor/config.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.
