# Configuration

## Configuration File

{% code title="settings.yml" %}

```yaml
# Logic behind the matches in case one or both players are offline
# at the time of the duel: if only one of the two players is offline,
# the other wins directly if both are offline, a lot draws a winner
settings:
  general:
    # If activated, teleports the player to the "exit" position
    teleport_after_duel: true
    # If activated, it saves the player's inventory before the duel and restores it after the duel
    save_and_restore_inventories: true
    # Require empty inventory before duel
    require_empty_inventory: false
    # If the player quit loses the duel, otherwise the duel ends when he dies (recommended default)
    handle_quit: true
    # The integration with placeholder api is automatic, therefore, it is advisable to leave the default value
    hook_in_papi: true
    starting_gamemode: SURVIVAL
    disable_hunger: true
    use_death_event: true
    no_team_name: "BYE"
    api_key: ""

  nametag:
    team1: "§7[§cR§7] §c"
    team2: "§7[§9B§7] §9"

  messages:
    tournament_starting:
      # %tournament% Name of the tournament
      # %rounds% Number of rounds
      - "§6The tournament is starting! §7(%tournament%) §7(%rounds% rounds)"
    opponent_offline:
      # %player% Name of the player involved (winner)
      - "§cThe opponent is offline! %player% won by forfeit."
    both_opponents_offline:
      # %player% Name of the player involved (winner)
      - "§cBoth players are offline. Random drawing of the winner..."
    match_victory:
      # %player% Name of the player involved (winner)
      - "§c%loser% §7lost against §a%winner% §7(§c%health%❤) §7in the duel."

  titles:
    # %round% Group number
    round_presentation:
      title: "§6§l%round%° Round"
      subtitle: ""
      fadeIn: 500
      stay: 2000
      fadeOut: 500
    # %player1% Name of the first player involved
    # %player2% Name of the second player involved
    match_presentation:
      title: "§6§lDuel"
      subtitle: "§c%player1% §7vs §9%player2%"
      fadeIn: 500
      stay: 2000
      fadeOut: 500
    match_starting:
      title: "§6§lStarting in"
      subtitle: "%seconds%"
      fadeIn: 200
      stay: 800
      fadeOut: 200
    # %player% Name of the player involved (winner)
    match_victory:
      title: "§b§l%player% §7won"
      subtitle: ""
      fadeIn: 500
      stay: 2000
      fadeOut: 500
    # %player% Name of the player involved (winner)
    third_place:
      title: "§6§l3° Place"
      subtitle: ""
      fadeIn: 500
      stay: 2000
      fadeOut: 500
    # %player% Name of the player involved (winner)
    tournament_victory:
      title: "§d§l%player%"
      subtitle: "§fwon the tournament"
      fadeIn: 500
      stay: 2000
      fadeOut: 500

sounds:
  arena_join: "ENTITY_EXPERIENCE_ORB_PICKUP"
  arena_leave: "ENTITY_EXPERIENCE_ORB_PICKUP"
  match_starting: "ENTITY_EXPERIENCE_ORB_PICKUP"
  match_victory: "ENTITY_PLAYER_LEVELUP"
  tournament_victory: "ENTITY_ENDER_DRAGON_GROWL"

events:
  # When a player enters the arena for his duel
  # %player% Name of the player involved
  arena_join:
    commands: [ ]
  # When a player leaves the arena for his duel
  # %player% Name of the player involved
  arena_leave:
    commands: [ ]

commands:
  invite:
    not_supported:
      - "§cThis command is not supported in this tournament"
    player_not_found:
      - "§cPlayer not found"
    invite_self:
      - "§cYou can't invite yourself"
    no_team:
      - "§cYou are not in a team"
    not_leader:
      - "§cYou are not the leader of the team"
    team_full:
      - "§cThe team is already full"
    already_in_team:
      - "§cPlayer is already in the team"
    invite_error:
      - "§cAn error occurred while inviting the player"
    already_sent:
      - "§cPlayer %player% has already been invited"
    invite_sent:
      - "§aPlayer %player% has been invited to the team"
    invite_received:
      - "§aYou have been invited to the team of %player%"

  join:
    not_invited:
      - "§cNo one has invited you in this team"
    success:
      - "§aYou signed up for the tournament"
    success_team:
      - "§aYou joined the team %team%"
    leader:
      - "§aPlayer %player% joined your team"
    no_team:
      - "§cTeam not found"
    full:
      - "§cThe team is already full"
    tournament_full:
      - "§cThe tournament is already full"
    already_participant:
      - "§cYou are already registered for the tournament"
    status_error:
      - "§cThe tournament doesn't accept new registrations"

  leave:
    not_participant:
      - "§cYou are not registered for the tournament"
    unsubscribe:
      - "§aYou have unsubscribed from the tournament"
```

{% endcode %}


---

# 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://docs.ohalee.com/products/ultimatetournament/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.
