# ParkourPro Configuration

# Language Settings
# Available languages: en_US, nl_NL, es_ES, fr_FR, de_DE
# Place custom language files in plugins/ParkourProLite/languages/
language: en_US

# MySQL Database Settings
mysql:
  enabled: false
  host: localhost
  port: 3306
  database: parkourpro
  username: root
  password: password
  table-prefix: parkour_

# Sounds Configuration (Set to empty string to disable)
sounds:
  checkpoint: ENTITY_EXPERIENCE_ORB_PICKUP
  start: BLOCK_NOTE_BLOCK_PLING
  finish: ENTITY_PLAYER_LEVELUP
  reset: BLOCK_NOTE_BLOCK_BASS
  teleport-back: ENTITY_ENDERMAN_TELEPORT

# Permission Settings
permissions:
  admin: parkour.admin
  use-permissions: true

# Parkour Lock Settings
locks:
  enabled: true

# Anti-Cheat Settings
anti-cheat:
  detect-fly: true
  # detect-teleport: if true, cancels all teleports while in parkour (except /parkour commands).
  # Set to false if you use command blocks or server-side teleports as part of your courses.
  detect-teleport: false
  teleport-threshold: 10.0  # Max distance allowed between moves

# Live Timer Display Settings
# Show elapsed time and checkpoint progress while in parkour
timer-display:
  enabled: true
  type: actionbar  # Options: actionbar, title, bossbar, disabled
  # Format: %time% = current time, %checkpoints% = current/total checkpoints
  format: "&e⏱ Time: &f%time% &7| &bCheckpoints: &f%checkpoints%"
  update-interval: 10  # Update interval in ticks (20 ticks = 1 second)

# Bed Confirmation Settings
bed-confirmation:
  enabled: true
  double-click-time: 1000  # Time window for double-click in milliseconds (1000 = 1 second)
  message: "&eDouble-click the bed to confirm leaving the parkour"

# Default Fallback Settings
fallback:
  # FallbackY: teleport when player drops below this Y coordinate
  y-enabled: false
  default-y: 65
  # Where to teleport a player when they fall/cheat while in a parkour
  # Values: reset, checkpoint
  teleport-target: reset

# Hologram Settings
holograms:
  enabled: true
  update-interval: 60  # Leaderboard update interval in seconds
  line-spacing: 0.30   # Spacing between hologram lines
  start-offset: 0.5    # Height above start plate for hologram base
  end-offset: 0.5      # Height above end plate for hologram base
  checkpoint-offset: 0.5 # Height above checkpoint plate for hologram base
  leaderboard-offset: 2.0 # Height above leaderboard plate/base for hologram
  show-prefix: true    # Show LuckPerms rank/prefix on hologram entries
  visibility-range: 64 # Hide holograms from players beyond this distance (0 = disabled)

  # Hologram text templates (supports color codes & and placeholders)
  text:
    start:
      - "&e&lParkour Challenge"
      - "&a&lStart"
      - "&7Best: &e%best_time%"
    end:
      - "&e&lParkour Challenge"
      - "&c&lEnd"
    checkpoint:
      - "&e&lCheckpoint"
      - "&b&l#%checkpoint%"
    leaderboard:
      # Customize the leaderboard appearance
      # Available placeholders: %parkour%, %update-interval%, %update-unit%
      header:
        - "&e&lLeaderboard"
        - "&7Update every &e%update-interval%&7 %update-unit%"
      # Entry format for each leaderboard position
      # Available placeholders: %pos%, %prefix%, %player%, %time%
      # %pos% = Position number with color (e.g., &6&l#1)
      # %prefix% = LuckPerms prefix/rank (if enabled)
      # %player% = Player name
      # %time% = Completion time
      entry-format: "%pos% &8» %prefix%%player% &8- &e%time%"
      # Position colors (use & color codes or hex #RRGGBB)
      position-colors:
        1: "&6&l"   # Gold for 1st place
        2: "&7&l"   # Silver for 2nd place
        3: "&c&l"   # Bronze for 3rd place
        default: "&e&l"  # Yellow bold for others
      # Text displayed when no record exists
      no-record-player: "Unknown"  # Player name when no record
      no-record-time: "--:--"        # Time display when no record

# Default First-Reward Commands
# Commands executed the first time a player completes any newly created parkour.
# These are applied automatically when a new parkour is created.
# To add more commands to a specific parkour, use: /parkour addfirstreward <name> <command>
# Use %player% as a placeholder for the player's name.
# Empty list = no default reward.
default-first-reward-commands:
  - ""

# Hotbar Items (given when a parkour starts)
# Edit lore lines to customize what players see in the item tooltip.
# Use [] for no lore. Color codes (&0-&f) are supported.
items:
  hotbar:
    teleport:
      material: HEAVY_WEIGHTED_PRESSURE_PLATE
      name: "&aTeleport to Last Checkpoint"
      slot: 3   # 0-based slot index (3 = fourth slot)
      click-type: RIGHT_CLICK  # RIGHT_CLICK, LEFT_CLICK, or BOTH
    reset:
      material: OAK_DOOR
      name: "&cReset"
      slot: 4   # 0-based slot index (4 = fifth slot)
      click-type: RIGHT_CLICK  # RIGHT_CLICK, LEFT_CLICK, or BOTH
    cancel:
      material: RED_BED
      name: "&cCancel"
      slot: 5   # 0-based slot index (5 = sixth slot)
      click-type: RIGHT_CLICK  # RIGHT_CLICK, LEFT_CLICK, or BOTH

# Death Handling
death:
  # If true, all parkours handle player death (teleport back) regardless of per-parkour toggle
  global-enabled: true
  # If true, respawn at last checkpoint; if false, respawn at parkour start
  respawn-to-checkpoint: true

# Leave Behavior
leave:
  # Where to teleport when a player leaves a parkour
  # Values: start = parkour start, reset = reset location, none = don't teleport
  teleport-to: reset

# Discord Bot Settings
discord:
  enabled: false
  token: ""           # Bot token from the Discord Developer Portal
  guild-id: ""        # Optional: register slash commands to a specific guild for instant availability
  leaderboard-size: 10 # How many entries to show in /scoreboard

  # Leaderboard Appearance
  title: "Leaderboard - %parkour%"  # Title of the leaderboard embed
  color: "#FFDD00"           # Hex color code for embed
  # Description shown under the /scoreboard command in Discord
  command-description: "Show the top players for a parkour"
  # Description shown for the parkour name option
  option-description: "Name of the parkour (auto-detected if only one exists)"
  table-format: true         # Use table format (true) or list format (false)
  show-prefix: true          # Include LuckPerms rank/prefix in Discord leaderboard

  # Table Column Headers (only used if table-format is true)
  column-rank: "Rank"
  column-member: "Member"
  column-points: "Time"

# -----------------------------------------------------------------
# Feature 4: Broadcast new record
# -----------------------------------------------------------------
broadcast:
  record:
    enabled: false
    # "server" = broadcast to every player on the server
    # "world"  = broadcast only to players in the same world as the parkour start
    scope: server

# -----------------------------------------------------------------
# Feature 5: Restart timer on same start
# -----------------------------------------------------------------
features:
  restart-on-same-start:
    enabled: false

