# ===========================================
#         BetterReplay Configuration
# ===========================================

# Internal config migration version. Do not edit unless instructed.
Config-Version: 7

General:
  # Check for plugin updates on startup.
  Check-Update: true
  # Storage backend to use: file or mysql.
  Storage-Type: file
  MySQL:
    # MySQL host name or IP address.
    host: host
    # MySQL port.
    port: 3306
    # MySQL database/schema name.
    database: database
    # MySQL username.
    user: username
    # MySQL password.
    password: password

Recording:
  Chunk-Capture:
    # Enable chunk baseline capture for binary .br replays.
    Enabled: false
    # Chunk radius around each tracked player used for baseline capture.
    Radius: 1
    # How often the recording recomputes the tracked chunk-interest window.
    Capture-Interval-Ticks: 20
    # Maximum number of unique chunks captured in one recording before truncation.
    Max-Unique-Chunks-Per-Recording: 10000

Playback:
  # Speed change increment per Faster/Slower click (e.g. 0.2 = 20%).
  Speed-Step: 0.25
  # Maximum playback speed multiplier. Must be >= 1.0.
  Max-Speed: 2.0

  # Safety mode applied to the real viewer when a replay starts.
  # Set this to creative to protect moderators from live-world hazards after the replay teleports them.
  # Set this to off to leave the viewer's current game mode unchanged.
  Viewer-Safety-Mode: creative
  # Hide replay viewers from live players while playback is active.
  # Leave this enabled on live servers so staff reviewing a replay do not appear inside protected builds.
  # Set this to false on dedicated replay servers if viewer visibility is intentional.
  Vanish-Viewer: true

  # Return the viewer to their original pre-replay location when playback ends.
  # Leave this enabled unless you intentionally want replay playback to strand viewers at the replay location.
  Restore-Viewer-Location-On-Stop: true
  # Restore the viewer's original game mode when playback ends.
  # Leave this enabled so temporary replay safety mode changes do not leak back into normal gameplay.
  Restore-Viewer-GameMode-On-Stop: true
  # Restore the viewer's original flight permissions when playback ends.
  # This keeps creative-mode replay safety from leaving allow-flight or flying enabled unexpectedly.
  Restore-Viewer-Flight-On-Stop: true
  # If a viewer disconnects during replay, restore their saved location and mode on the next join.
  # Leave this enabled so logout during playback does not leave staff at a replay location or in the wrong mode.
  Restore-Viewer-State-On-Rejoin: true

  # Replay chunk playback mode: 1 restores live chunks as they leave the replay window; 2 defers live chunk restore until replay stop and resends replay chunks if they naturally unload and later return.
  Chunk-Mode: 1
  # Chunk radius around the replay viewer used for chunk snapshot playback. This is separate from recording chunk capture radius.
  Chunk-View-Radius: 3
  # Maximum number of replay chunks sent to the viewer per tick during packet-friendly chunk playback. Increase this on dedicated replay servers to fill larger chunk view radii faster.
  Chunk-Send-Limit-Per-Tick: 2
  # Maximum number of live chunks restored to the viewer per tick during packet-friendly chunk teardown. Increase this on dedicated replay servers to clear larger chunk view radii faster.
  Chunk-Clear-Limit-Per-Tick: 2
  # Log replay chunk load and restore stage timings during playback for MSPT troubleshooting.
  Chunk-Timing-Diagnostics: false

Retention:
  # Enable automatic deletion of old replays.
  Enabled: true
  # Maximum age of a replay before it becomes eligible for retention cleanup.
  Max-Age: 21d
  # How often the retention service scans for expired replays.
  Check-Interval: 6h
  # Whether retention should continue deleting other expired replays after one delete fails.
  Delete-Partial-Failures: true
  # Whether successful retention deletions are logged individually.
  Log-Deletions: true

List:
  # Number of replay names shown per /replay list page.
  Page-Size: 10
  # Chat color code used to highlight protected replays in /replay list (for example &6).
  Protected-Highlight-Color: '&6'