# Configuration

## Default config

```yaml
games:
  game1:
    enabled: true
    messages:
      - "2 + 2 = ?"
    hover:
      enabled: true
      lines:
        - "&2Hint: &a2 * 2 = ?"
        - "&bWrite the keyword"
    action:
      enabled: true
      action: "[OPEN] https://tect.host/"
    keywords:
      - "4"
      - "four"
    rewards:
      - "give %winner% diamond 1"
    options:
      endTime: 30
      time: 300
    startEffects:
      title:
        enabled: true
        text: "&aGame 1 Started!"
        subtitle: "&eSolve the puzzle!"
        fadeIn: 10
        stay: 70
        fadeOut: 20
      sound:
        enabled: true
        name: "ENTITY_PLAYER_LEVELUP"
        volume: 1
        pitch: 1
      particle:
        enabled: true
        name: "EXPLOSION_NORMAL"
        count: 10
        speed: 1
      actionBar:
        enabled: true
        text: "The game is live!"
    endEffects:
      title:
        enabled: true
        text: "&cGame Over!"
        subtitle: "&eThanks for playing!"
        fadeIn: 10
        stay: 70
        fadeOut: 20
      sound:
        enabled: true
        name: "ENTITY_FIREWORK_ROCKET_LAUNCH"
        volume: 1
        pitch: 1
      particle:
        enabled: true
        name: "FIREWORKS_SPARK"
        count: 10
        speed: 1
      actionBar:
        enabled: true
        text: "&cGame has ended!"
    winnerEffects:
      title:
        enabled: true
        text: "&aCongratulations %winner%!"
        subtitle: "&aYou are the champion!"
        fadeIn: 10
        stay: 70
        fadeOut: 20
      sound:
        enabled: true
        name: "ENTITY_FIREWORK_ROCKET_TWINKLE"
        volume: 1
        pitch: 1
      particle:
        enabled: true
        name: "HEART"
        count: 20
        speed: 1
      actionBar:
        enabled: true
        text: "&aYou've won the game!"
```

## General configuration

### Enabled

Enable or disable this game

{% hint style="info" %}
**What is this option useful for?**&#x20;

This option can be useful if you want to deactivate a game but not delete it, or if you want to use it in the future but not at the moment.
{% endhint %}

### Messages

Messages to be sent by chat at the start of a game

{% hint style="warning" %}
**Remember to give a hint of the keyword!**
{% endhint %}

### Hover

* **Enabled:** Enable/disable this feature
* **Lines:** The hover text lines

### Action

* **Enabled:** Enable/disable this feature
* **Action:** The action exeuted on click in the message&#x20;
  * **Actions:**
  * \[SUGGEST] (suggest a command)
  * \[EXECUTE] (execute a command)
  * \[OPEN] (open a link)

### Keywords

These are the key words to win the game (you can use as many as you want)

[Types](https://tchat.tect.host/chat-games/configuration/key-words)

### Rewards

These are the commands that will be executed when a player wins the game, use the placeholder %winner% to refer to the name of the winning player

### Options

#### EndTime

The time the game will be active before it ends (if the game is not won before)

#### Time

The time between the actual game and the next game

## Effects

### Types

#### Start effects

The effects will be executed at the start of the game

#### End effects

The effects will be executed when the game is over (and I am not the winner)

#### Win effects

The effects will be executed when the game is won

### Effects

#### Title

* **Enabled:** Enable/disable the title and subtitle
* **Text:** Title text
* **Subtitle:** Subtitle text
* **FadeIn:** The time (in ticks) that the animation will do when the title is displayed
* **Stay:** The time (in ticks) the title will remain on the screen
* **FadeOut:** The time it will take for the animation to fade out the title

#### Sound

* **Enabled:** Enable/disable sound
* **Name:** The [sound](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html) name
* **Volume:** The volume of the sound
* **Pitch:** The range of the sound

#### Particle

* **Enabled:** Enable/disable particles
* **Name:** The [particle ](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Particle.html)name
* **Count:** The number of particles
* **Speed:** The speed of the particles

#### Action bar

* **Enabled:** Enable/disabled action bar
* **Text:** The action bar text
