# Configuration

## Strikes-Dialogues | Full Configuration Guide

Welcome to the full configuration guide for **Strikes-Dialogues**! 🌟 Here, we’ll cover every setting in your `config.yml` file, providing you with detailed descriptions and tips on how to customize the plugin to your exact needs.

### Table of Contents

* General Dialogue Settings
* Predefined Dialogues
* Plugin Messages

***

### General Dialogue Settings

This section contains global settings for all dialogues. These configurations control how dialogues are presented and behave on your server.

#### `persistent-background-line`

**Type**: `String`\
**Default**: `&f`\
Defines the background line displayed throughout dialogues. This is useful for adding a visual effect behind the dialogue text, enhancing the player experience. You can change this to any symbol or character you prefer. 🖼️

#### `default-animation-delay-ticks`

**Type**: `Long`\
**Default**: `2`\
Controls the delay between the animation of each line, measured in Minecraft ticks. Increasing this value will slow down the dialogue’s appearance, giving players more time to read each line. ⏳

#### `default-bar-color`

**Type**: `BarColor`\
**Default**: `BLUE`\
Uses the invisible boss bar from your resource pack (Do not change if not important)

#### `default-bar-style`

**Type**: `BarStyle`\
**Default**: `SOLID`\
Uses the invisible boss bar from your resource pack (Do not change if not important)

#### `default-hold-time-ticks`

**Type**: `Long`\
**Default**: `40`\
This setting determines how long the dialogue will hold on a page before moving to the next one. If you want the dialogue to last longer, increase the value. 🕒

#### `default-typing-sound`

**Type**: `String`\
**Default**: `"ui.button.click"`\
The sound that plays when the dialogue text is being typed. You can change it to any Minecraft sound to match the atmosphere. 🎧

#### `default-typing-volume`

**Type**: `Float`\
**Default**: `0.3`\
Controls the volume of the typing sound. You can lower or raise this depending on how audible you want the typing sound to be. 🎵

#### `default-typing-pitch`

**Type**: `Float`\
**Default**: `1.8`\
Adjusts the pitch of the typing sound. A higher pitch makes the sound more pronounced, while a lower pitch makes it subtler. 🔊

#### `enable-movement-restriction`

**Type**: `Boolean`\
**Default**: `true`\
When enabled, players will be restricted from moving while a dialogue is active. This ensures that players focus on the dialogue and prevents them from moving away. 🚶‍♂️🚫

#### `custom-command-max-lines`

**Type**: `Integer`\
**Default**: `4`\
Limits the number of lines a custom command dialogue can contain. If you try to exceed this number, the dialogue will be cut off. 📝

#### `custom-command-background-char`

**Type**: `String`\
**Default**: `&f`\
Defines the background character for custom commands. Similar to `persistent-background-line`, this creates a background for custom command dialogues. 🖋️

#### `placeholderapi-enabled`

**Type**: `Boolean`\
**Default**: `true`\
Enables PlaceholderAPI integration for dynamic placeholders. This allows you to insert things like the player’s name, balance, world, etc. in your dialogues. 🌐

#### `end-action-delay-ticks`

**Type**: `Long`\
**Default**: `0`\
Defines the delay before executing end actions after a dialogue ends. If you want a pause before actions trigger, adjust this value. ⏲️

#### `lock-perspective`

**Type**: `Boolean`\
**Default**: `true`\
Locks the player’s perspective during the dialogue. This prevents them from looking away, keeping their focus on the dialogue. 👁️

#### `debug-logging`

**Type**: `Boolean`\
**Default**: `false`\
When enabled, this will print debug information to the console. It’s useful for developers or testers who need to troubleshoot. 💻

***

### Predefined Dialogues

This section contains the premade dialogues that come with Strikes-Dialogues. These dialogues can be easily customized or replaced.

#### `welcome_intro`

This is a welcoming dialogue for players joining your server. It can display the player’s name, balance, and other custom messages.

**Settings:**

* **`animation-delay-ticks`**: Adjusts how quickly the text is animated.
* **`typing-sound`**: No typing sound in this dialogue (set to `""`).
* **`start-sound`**: No start sound (set to `""`).

**Pages:**

This dialogue includes two pages:

1. **Page 1**:
   * `Hello %player_name%!`
   * `Welcome to the world of unknown.`
   * `Balance: %vault_eco_balance_fixed%`
2. **Page 2**:
   * `SECOND PAGE <3 %player_name%!`
   * `Support PlaceholdersAPI %player_world%`

**End Actions:**

* **Console**: `say Player %player_name% finished welcome_intro`
* **Message**: `&aDialogue complete!`

#### `hardsample`

This dialogue shows off more advanced features, such as placeholders and gradient text.

**Settings:**

* **`persistent-background-line`**: `"<#FFFFFF>"`
* **`animation-delay-ticks`**: `1`
* **`typing-sound`**: `"ui.button.click"`
* **`start-sound`**: `"hardsample"`

**Pages:**

This dialogue includes a few pages:

1. **Page 1**:
   * `&9This dialogue showcases various features.`
   * `&6&lPlaceholderAPI Supported &8| &2Current World: %player_world%`
2. **Page 2**:
   * `Server Performance: %server_tps% TPS`
   * `Location: X:%player_x% Y:%player_y% Z:%player_z%`
   * `Gamemode: %player_gamemode%`

**End Actions:**

* **Console**: `say Dialogue Finished!`
* **Message**: `&aDialogue Finished! Hope you learned something!`
* **Player Action**: `me Is impressed by the dialogue features!`
* **Broadcast**: `&e[Server] %player_name% just experienced the enhanced dialogue system!`
* **Sound**: `entity.player.levelup volume:0.8 pitch:1.2`
  * `[CONSOLE] : Execute as console`
  * `[PLAYER] : Execute as player`
  * `[BROADCAST] : Broadcast to all players (Act as message)`
  * `[SOUND] : Play sound after dialogue is finished`
  * `[MESSAGE] : Send message to player`

#### `no_background_dialogue`

This is a basic dialogue with no persistent background.

**Settings:**

* **`persistent-background-line`**: `""` (No background line)

**Pages:**

* **Page 1**: `&aThis dialogue has no persistent background.`

***

### Plugin Messages

This section defines all the messages used by the plugin for interactions with players and admins.

#### `no-permission`

**Message**: `&cYou don't have permission for that.`\
Shown when a player tries to use a command they don't have permission for.

#### `player-only`

**Message**: `&cThis command can only be run by a player.`\
Displayed when a command can only be executed by a player.

#### `dialogue-not-found`

**Message**: `&cDialogue '{id}' could not be found.`\
This message is shown when the requested dialogue doesn’t exist.

#### `custom-line-limit`

**Message**: `&cYou can only use up to {limit} lines for custom dialogues.`\
Displayed when the player exceeds the maximum line limit for custom dialogues.

#### `reload-success`

**Message**: `<#00AA00>Strikes-Dialogues configuration reloaded successfully.`\
This message confirms that the plugin’s configuration has been successfully reloaded.

#### `reload-fail`

**Message**: `&cConfiguration reload failed. Check console for errors.`\
Displayed when an error occurs during the reload process.

#### `must-be-on-ground`

**Message**: `&cYou must be standing firmly on the ground to start a dialogue!`\
This message appears when a player is not on the ground but attempts to start a dialogue.

***

### Default `config.yml`

```yaml
# ----------------------------------------
#    STRIKES-DIALOGUES | CONFIG V1.0
# ----------------------------------------
# Discord: https://discord.gg/WSbNB45fse
# ----------------------------------------

dialogue-settings:
  persistent-background-line: "&f"
  default-animation-delay-ticks: 2
  default-bar-color: BLUE
  default-bar-style: SOLID
  default-hold-time-ticks: 40
  default-typing-sound: "ui.button.click"
  default-typing-volume: 0.3
  default-typing-pitch: 1.8
  enable-movement-restriction: true
  enable-zoom-effect: true
  zoom-walk-speed: -0.15
  custom-command-max-lines: 4
  custom-command-background-char: "&f"
  placeholderapi-enabled: true
  end-action-delay-ticks: 20
  lock-perspective: true
  debug-logging: false

dialogues:
  welcome_intro:
    settings:
      animation-delay-ticks: 1
      typing-sound: ""
      start-sound: ""
    pages:
      - - "<#00FF00>Hello <#FFFF00>%player_name%<#00FF00>!"
        - "<#FFFFFF>Welcome to the world of unknown."
        - "<#FFFFFF>Balance: <#F32AFF>%vault_eco_balance_fixed%"
        - "<gradient:#FFAA00:#FF0000>Seek the truth!</gradient>"
      - - "<#00FF00>SECOND PAGE <3 <#FFFF00>%player_name%<#00FF00>!"
        - "<#FFFFFF>More text here for second page"
        - "<#FFFFFF>Support PlaceholdersAPI <#F32AFF>%player_world%"
        - "<gradient:#00AAAA:#00FFAA>Keep going!</gradient>"
    end-actions:
      - "[CONSOLE] say Player %player_name% finished welcome_intro"
      - "[MESSAGE] &aDialogue complete!"

  hardsample:
    settings:
      persistent-background-line: "<#FFFFFF>"
      animation-delay-ticks: 1
      typing-sound: "ui.button.click"
      start-sound: "hardsample"
    pages:
      - - "<gradient:#00C1FF:#33FF57>&lWelcome, %player_name%</gradient>!"
        - "&9This dialogue showcases various features."
        - "&6&lPlaceholderAPI Supported&r &8| &2Current World: &b%player_world%"
        - "<gradient:#FDF5E6:#FFD700>Various End-Actions [CONSOLE], [PLAYER], [SOUND], [BROADCAST] & many more!</gradient>"
      - - "<#41E8FA>Server Performance: <yellow>%server_tps% TPS"
        - "<#40E0D0>Location:</#40E0D0> <#98FB98>X:%player_x% Y:%player_y% Z:%player_z%"
        - "Gamemode: <gold>%player_gamemode%"
        - "<gradient:#B3FB08:#FF0000>&lGRADIENT SUPPORT</gradient>"
        - "Vault Balance: <#C0C0C0>%vault_eco_balance_formatted%"
        - "&6&lSUPPORT FORMATTING BUT NOT UNDERLINE AND STRIKETHROUGH, SORRY"
    end-actions:
      - "[MESSAGE] &aDialogue Finished! Hope you learned something, %player_name%!"
      - "[PLAYER] me Is impressed by the dialogue features!"
      - "[BROADCAST] &e[Server] &f%player_name% just experienced the enhanced dialogue system!"
      - "[SOUND] entity.player.levelup volume:0.8 pitch:1.2"
      - "[MESSAGE] &aDialogue Finished! and executed these commands!"
      - "[MESSAGE] &8&l========================================"
      - "[MESSAGE] &4&lThe voice/sound you heard is actually from the resource pack!"
      - "[MESSAGE] &8&l========================================"

  no_background_dialogue:
    settings:
      persistent-background-line: ""
    pages:
      - - "&aThis dialogue has no persistent background."
```


---

# 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://coziest-room.gitbook.io/coziest-docs/coziest-plugins/strikes-dialogues/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.
