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

# ⚙️ Configuration

## 📂 Configuration Files

This section presents the standard configuration files for the plugin. You can use them as a reference if you accidentally break your settings.

### ⚙️ config.yml (Main Settings)

This file handles database connections, economy settings, cooldowns, and groups (ranks).

> Path: `plugins/UniversalMessages/config.yml`

YAML

```
# -----------------------------------------------------------------------------
#  _   _       _                          _  __  __
# | | | |_ __ (_)_   _____ _ __ ___  __ _| |/ / | | ___  ___ ___  __ _  __ _  ___ ___
# | | | | '_ \| | \ / / _ \ '__/ __|/ _` | | /| | |/ _ \/ __/ __|/ _` |/ _ \/ __|
# | |_| | | | | |\ V /  __/ |  \__ \ (_| | | \| | |  __/\__ \__ \ (_| | (_| |  __/\__ \
#  \___/|_| |_|_| \_/ \___|_|  |___/\__,_|_|\_\_|_|\___||___/___/\__,_|\__, |\___||___/
#                                                                      |___/
# UniversalMessages — The most powerful plugin for join, quit, and death messages.
# Author: Deviaski
# -----------------------------------------------------------------------------

# =============================================================================
# [0] GENERAL SETTINGS
# =============================================================================
# Language file to use (en, ru, de, etc.)
# The file must exist in the /lang/ folder: messages_en.yml, messages_ru.yml
language: "en"

# =============================================================================
# [1] DATA STORAGE (STORAGE)
# =============================================================================
storage:
  # Database type:
  # SQLITE — Local file database.db (Perfect for single servers)
  # MYSQL  — External database (For server networks / BungeeCord)
  type: SQLITE

  # Connection settings for MYSQL
  mysql:
    host: "localhost"
    port: 3306
    database: "minecraft"
    username: "root"
    password: ""
    properties: "?useSSL=false&autoReconnect=true"

# =============================================================================
# [2] ECONOMY (ECONOMY)
# =============================================================================
economy:
  # If true, the plugin will use Vault or PlayerPoints to purchase messages.
  # If false, all messages will be free.
  enabled: true

# =============================================================================
# [3] VANILLA MESSAGE SETTINGS
# =============================================================================
# Hide standard yellow Minecraft messages?
disable-vanilla-quit: true   # "Player left the game"
disable-vanilla-death: true  # "Player died"

# =============================================================================
# [4] DISPLAY CONDITIONS (CONDITIONS)
# =============================================================================
conditions:
  # In which worlds should plugin messages NOT be shown?
  disabled-worlds:
    - 'auth_lobby'
    - 'pvp_arena_1'

  # Online player limits for showing messages
  # (to avoid spam at night or on full servers)
  # 0 = restriction disabled
  min-online: 0
  max-online: 0

# =============================================================================
# [5] SPAM PROTECTION (COOLDOWNS)
# =============================================================================
# Delay in seconds before repeating a message/sound for the same player.
message-cooldown: 5
sound-cooldown: 5

# =============================================================================
# [6] SERVER GREETINGS (MOTD)
# =============================================================================
# Message visible ONLY to the player who joined (in their chat).
server-welcome:
  enabled: true
  lines:
    - "&f"
    - "&f Welcome, %player%!"
    - "&f We wish you a pleasant game on our server."
    - "&f Online: &a%server_online%"
    - "&f"

# Message if a player joins for the FIRST TIME (First Join)
first-join:
  enabled: true
  lines:
    - "&f"
    - "&6&lNEWCOMER! &fLet's welcome %player% — they are here for the first time!"
    - "&f"

# =============================================================================
# [7] GROUP MESSAGES (RANKS)
# =============================================================================
# If a player has NOT selected a personal message in the menu (/messages),
# the plugin checks these groups from top to bottom.
groups:
  legend:
    permission: "um.group.legend"
    join: "&6&lLEGEND &8» &f%player% &eflew in on a dragon!"
    quit: "&6&lLEGEND &8» &f%player% &eflew off into the sunset..."

  ultra:
    permission: "um.group.ultra"
    join: "&b&lULTRA &8» &f%player% &bburst into the server!"
    quit: "&b&lULTRA &8» &f%player% &bleft us."

  deluxe:
    permission: "um.group.deluxe"
    join: "&d&lDELUXE &8» &f%player% &dappeared."
    quit: "&d&lDELUXE &8» &f%player% &devaporated."

  premium:
    permission: "um.group.premium"
    join: "&a&lPREMIUM &8» &f%player% &ajoined the game."
    quit: "&a&lPREMIUM &8» &f%player% &aleft the game."

  vip:
    permission: "um.group.vip"
    join: "&a[VIP] &f%player% joined."
    quit: "&a[VIP] &f%player% disconnected."
```

***

### 🌍 languages/en.yml (Translations)

This file contains all system messages, menu button names, and chat formats. You can create your own file (e.g., `custom.yml`) and specify it in `config.yml`.

> Path: `plugins/UniversalMessages/languages/en.yml`

YAML

```
messages:
  prefix: "&8[&dUniversalMessages&8] "
  no-permission: "&cYou do not have permission."
  not-player: "&cOnly players can use this command."
  reload-success: "&aConfiguration and languages reloaded!"

  # Help
  help-header: "&8[&dUniversalMessages&8] &7Help:"
  help-line-messages: "&d/messages &8- &7Open selection menu"
  help-line-reload: "&d/um reload &8- &7Reload plugin"
  help-line-give: "&d/um givemessage <player> <id> &8- &7Give message"
  help-line-take: "&d/um takemessage <player> <id> &8- &7Take message"

  # Errors & Admin
  cmd-usage-give: "&cUsage: /um givemessage <player> <id>"
  cmd-usage-take: "&cUsage: /um takemessage <player> <id>"
  no-such-player: "&cPlayer not found."
  no-such-message: "&cMessage with ID '%id%' not found."
  cmd-processing: "&7Processing..."
  give-success: "&aMessage %id% given to player %target%."
  take-success: "&aMessage %id% taken from player %target%."
  cmd-player-not-owned: "&cPlayer does not own this message."

  # Toggles
  msgs-on: "&aYou can now see join/quit messages again."
  msgs-off: "&cYou hid join/quit messages from other players."
  sounds-on: "&aMessage sounds enabled."
  sounds-off: "&cMessage sounds disabled."

  # Economy & Buying
  price-format: "&7Price: &6%price%"
  currency-money: "$"
  currency-points: " pts"
  not-enough-money: "&cNot enough funds."
  buy-success: "&aPurchase successful! &7You unlocked &f%name%&7."
  buy-free: "&aYou unlocked &f%name%&7!"

  # Selection & Statuses
  select-success: "&aSelected! &7Now using: %name%"
  reset-success: "&aSelection reset to default."

  # --- Protection (Fool-proofing) ---
  already-selected: "&cThis message is already selected!"
  nothing-to-clear: "&cYou have no active message to clear."
  already-random: "&cRandom selection is already active."

  preview: "&8[&bPreview&8] &r%preview%"

  # --- GUI Formats ---
  # This is needed for code to display message types
  type-format: "&7Type: &3%type%"
  type-label: "&7Type:"

  # GUI Statuses
  status-selected: "&a✔ Selected"
  status-owned: "&e▸ Click to select"
  status-buy: "&a▸ Click to buy"
  status-preview: "&bRight-Click to preview"

gui:
  # --- Main Menu ---
  main-menu:
    title: "&8Messages"
    buttons:
      join:
        name: "&#96F52EJoin Messages &7👋"
        lore:
          - " &#F5F7FAConfigure a unique greeting"
          - " &#F5F7FAthat players will see when"
          - " &#F5F7FAyou join the server."
          - ""
          - " &#E3FFB8▸ Click to open"
      quit:
        name: "&#FF8A3AQuit Messages 🚪"
        lore:
          - " &#F5F7FAChoose the message that"
          - " &#F5F7FAwill be displayed when"
          - " &#F5F7FAyou leave the game."
          - ""
          - "&#FFE0BF▸ Click to open"
      death:
        name: "&#FF6F7FDeath Messages &7☠"
        lore:
          - " &#F5F7FAPersonalize the text that"
          - " &#F5F7FAappears in chat after"
          - " &#F5F7FAyou die."
          - ""
          - "&#FFD1D4▸ Click to open"
      kill:
        name: "&#39E1FFKill Messages &7⚔"
        lore:
          - " &#F5F7FASet up a victory cry"
          - " &#F5F7FAthat everyone will see"
          - " &#F5F7FAwhen you defeat an enemy."
          - ""
          - " &#CFF9FF▸ Click to open"

  # --- Category Menus ---
  join-menu:
    title: "&8Messages > Join"
  quit-menu:
    title: "&8Messages > Quit"
  death-menu:
    title: "&8Messages > Death"
  kill-menu:
    title: "&8Messages > Kill"

  # Navigation
  shared-buttons:
    prev:
      name: "&7← Previous Page"
      lore: ["&7Go to page %page%"]
    next:
      name: "&7Next Page →"
      lore: ["&7Go to page %page%"]
    back:
      name: "&7↩ Back to Main Menu"
      lore: ["&7Return to categories"]
    clear:
      name: "&c✖ Reset Selection"
      lore:
        - "&7Click to disable your"
        - "&7custom message."
    random:
      name: "&d🎲 Random Selection"
      lore:
        - "&7Select a random message"
        - "&7from your unlocked collection"
        - "&7every time."
        - ""
        - "&d▸ Click to enable"
```

***

### 🖥️ inventories.yml (Interface Layout)

This file configures the visual part of the menu: button positions, decor items (glass panes), and product item structures (layouts).

> Path: `plugins/UniversalMessages/inventories.yml`

YAML

```
# =============================================================================
#  GUI CONFIGURATION
#  Here you configure ONLY the layout: slots, materials, and sizes.
#  All text (names, lore, titles) is located in the /languages/ folder.
# =============================================================================

# --- MAIN MENU (/um messages) ---
main-menu:
  size: 45
  decor:
    - slots: [0,1,2,3,4,5,6,7,8,9,17,18,26,27,35,36,37,38,39,40,41,42,43,44]
      material: GRAY_STAINED_GLASS_PANE

  # Category Buttons
  buttons:
    join:
      enabled: true
      slot: 19
      material: OAK_DOOR
    quit:
      enabled: true
      slot: 21
      material: IRON_DOOR
    death:
      enabled: true
      slot: 23
      material: SKELETON_SKULL
    kill:
      enabled: true
      slot: 25
      material: DIAMOND_SWORD

# --- CATEGORY MENUS ---
# Settings for each menu type.
# You can configure different layouts for different categories.

join-menu:
  size: 54
  decor:
    - slots: [0,1,2,3,4,5,6,7,8,9,17,18,26,27,35,36,44,46,47,48,50,51,52]
      material: GRAY_STAINED_GLASS_PANE
  buttons:
    prev:
      enabled: true
      slot: 48
      material: ARROW
    clear:
      enabled: true
      slot: 49
      material: BARRIER
    next:
      enabled: true
      slot: 50
      material: ARROW
    random:
      enabled: true
      slot: 53
      material: ENDER_PEARL
    back:
      enabled: true
      slot: 45
      material: OAK_DOOR

quit-menu:
  size: 54
  decor:
    - slots: [0,1,2,3,4,5,6,7,8,9,17,18,26,27,35,36,44,46,47,48,50,51,52]
      material: GRAY_STAINED_GLASS_PANE
  buttons:
    prev:
      enabled: true
      slot: 48
      material: ARROW
    clear:
      enabled: true
      slot: 49
      material: BARRIER
    next:
      enabled: true
      slot: 50
      material: ARROW
    random:
      enabled: true
      slot: 53
      material: ENDER_PEARL
    back:
      enabled: true
      slot: 45
      material: OAK_DOOR

death-menu:
  size: 54
  decor:
    - slots: [0,1,2,3,4,5,6,7,8,9,17,18,26,27,35,36,44,46,47,48,50,51,52]
      material: GRAY_STAINED_GLASS_PANE
  buttons:
    prev:
      enabled: true
      slot: 48
      material: ARROW
    clear:
      enabled: true
      slot: 49
      material: BARRIER
    next:
      enabled: true
      slot: 50
      material: ARROW
    random:
      enabled: true
      slot: 53
      material: ENDER_PEARL
    back:
      enabled: true
      slot: 45
      material: OAK_DOOR

kill-menu:
  size: 54
  decor:
    - slots: [0,1,2,3,4,5,6,7,8,9,17,18,26,27,35,36,44,46,47,48,50,51,52]
      material: GRAY_STAINED_GLASS_PANE
  buttons:
    prev:
      enabled: true
      slot: 48
      material: ARROW
    clear:
      enabled: true
      slot: 49
      material: BARRIER
    next:
      enabled: true
      slot: 50
      material: ARROW
    random:
      enabled: true
      slot: 53
      material: ENDER_PEARL
    back:
      enabled: true
      slot: 45
      material: OAK_DOOR

# --- ITEM LAYOUTS ---
# Use placeholders:
# {type_line}        - Type string (taken from lang: type-format)
# {message_preview}  - Message text
# {subtitle_preview} - Subtitle (if present)
# {price_line}       - Price (hidden if owned)
# {status_line}      - Status (Buy / Select / Selected)
# {preview_hint}     - Hint "Right-click to preview"
#
# You can add empty lines "" or your own text.

layouts:
  product-item:
    - "{type_line}"
    - ""
    - "&7Message:"
    - "{message_preview}"
    - "{subtitle_preview}"
    - ""
    - "{price_line}"
    - "{status_line}"
    - ""
    - "{preview_hint}"
```


---

# 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 dynamically by asking a question.

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

```
GET https://advion.gitbook.io/advion-docs/configuration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
