# ============================================================================
#                    HOMESTEAD CONFIGURATION FILE
# ============================================================================
# Homestead - A free, open-source land claiming plugin for Minecraft
# Documentation: https://tayebyassine.github.io/Homestead/
# Discord Support: https://discord.gg/uh7gqDY6sz
# Repository: https://github.com/TayebYassine/Homestead
#
# IMPORTANT: Delete this file and restart to regenerate defaults
# All settings take effect after /hsadmin reload or server restart
# ============================================================================

# Debug Mode - Show detailed console messages for troubleshooting
# WARNING: Can flood console on busy servers. Only enable when debugging.
debug: false

# Anonymous Usage Statistics (bStats and FastStats)
# NO personal data collected. https://bstats.org/privacy-policy https://faststats.dev/privacy
metrics: true

# ============================================================================
# LANGUAGE AND MENUS CONFIGURATION
# ============================================================================

# Language file to load from languages/ folder
# Fallback: en-US if file doesn't exist
language: "en-US"

# Menu file to load from menus/ folder
# Fallback: en-US if file doesn't exist
menus: "en-US"

# ============================================================================
# DATABASE CONFIGURATION
# ============================================================================

database:
  # Provider: sqlite (default), mysql, mariadb, postgresql, mongodb, yaml
  # sqlite: Good for small-medium servers, no setup required
  # mysql/mariadb/postgresql: Good for large servers (100+ players)
  # mongodb: Good for large servers (requires subscription for tiers)
  # yaml: Human-readable, slowest (not recommended for production)
  provider: "sqlite"

  # PostgreSQL settings (only used if provider = "postgresql")
  postgresql:
    host: "localhost"
    port: 5432
    username: "USERNAME"
    password: "PASSWORD"
    database: "homestead_data"
    table_prefix: ""
    jdbc_url_parameters: ""

  # MariaDB settings (only used if provider = "mariadb")
  mariadb:
    host: "localhost"
    port: 3306
    username: "USERNAME"
    password: "PASSWORD"
    database: "homestead_data"
    table_prefix: ""
    jdbc_url_parameters: "?allowPublicKeyRetrieval=true&useSSL=false&serverTimezone=UTC"

  # MySQL settings (only used if provider = "mysql")
  mysql:
    host: "localhost"
    port: 3306
    username: "USERNAME"
    password: "PASSWORD"
    database: "homestead_data"
    table_prefix: ""
    jdbc_url_parameters: ""

  # MongoDB settings (only used if provider = "mongodb")
  mongodb:
    uri: "mongodb://localhost:27017"  # Or Atlas SRV URI
    database: "homestead"
    collection_prefix: "hs_"

  # SQLite filename (only used if provider = "sqlite")
  sqlite: "homestead_data.db"

# Cache Flush Interval (seconds)
# How often cached data is written to database
# Lower = frequent saves, more CPU usage | Higher = better performance, slight crash risk
# Recommendations: <20 players: 30s | 20-50: 60s | 50-100: 120-180s | 100+: 300s
cache-interval: 30

# ============================================================================
# PLUGIN INTEGRATIONS
# ============================================================================

# WorldGuard Integration - Prevent claiming inside WG-protected regions
worldguard:
  protect-existing-regions: true

# FastAsyncWorldEdit (FAWE) Integration - Regenerate chunks when regions are deleted or chunks are unclaimed
# NOTE: This is not supported for Folia!
fastasyncworldedit:
  regenerate-chunks: false

# PlaceholderAPI Integration - Display Homestead data in chat/tab/scoreboards
placeholderapi:
  default:
    region_bank: "None"
    region_name: "None"
    region_claimed_chunks: "0"
    region_max_chunks: "0"
    region_trusted_members: "0"
    region_max_members: "0"
    region_current: "&7wilderness"
    upkeep_amount: "0,00"
    upkeep_at: "Never"
    war_name: "None"
    war_prize: "0,00"

# Dynamic Web Maps Integration (dynmap, squaremap, BlueMap, Pl3xMap)
dynamic-maps:
  enabled: true

  # Update frequency (seconds). Lower = faster updates, more CPU usage
  update-interval: 60

  # Custom region icons (players select with /region set icon [name])
  icons:
    enabled: false
    default: https://imgur.com/TUQzlCK.png
    size: 20
    list:
      Hut: https://imgur.com/GFrfD0H.png
      Outpost: https://imgur.com/4EvpONv.png
      Mansion: https://imgur.com/62ofr2V.png
      Igloo: https://imgur.com/OgBJV1H.png
      Gateway: https://imgur.com/7saPOc2.png
      Fortress: https://imgur.com/pqSHXJ6.png
      EndCity: https://imgur.com/bKRiedi.png
      Desert: https://imgur.com/EjQ5QJk.png
      Bastion: https://imgur.com/FwuLrG4.png
      Netherite: https://i.imgur.com/DTpAqCP.png
      Diamond: https://imgur.com/MQSe8Qs.png

  # Chunk display settings
  chunks:
    operator-color: 0xFF0000
    operator-description: "<div style='font-size:16px;'><b>[Operator] {region} (#{global-rank})</b></div>{region-description}<br><br><b>Owner</b>: {region-owner}<br><b>Members</b>: {region-members}<br><b>Chunks</b>: {region-chunks}<br><b>Size</b>: {region-size} blocks"
    color: 0x00FF00
    description: "<div style='font-size:16px;'><b>{region} (#{global-rank})</b></div>{region-description}<br><br><b>Owner</b>: {region-owner}<br><b>Members</b>: {region-members}<br><b>Chunks</b>: {region-chunks}<br><b>Size</b>: {region-size} blocks"
    transparency-fill: 40
    transparency-outline: 125

# ============================================================================
# MISCELLANEOUS SETTINGS
# ============================================================================

# Formatting Strings - Customize date, money, location displays
# WARNING: Only edit if you know what you're doing!
formatters:
  date-format: "dd/M/yyyy hh:mm a"
  date: "{date} &7({time-ago} ago)"
  duration: "{d} days, {h} hours, {m} minutes" # Removed "{s} seconds", you can add it

  ago-days: "{v} days"
  ago-hours: "{v} hours"
  ago-minutes: "{v} minutes"
  ago-seconds: "{v} seconds"

  balance: "${balance}"
  location: "&f{world} &7(X: &f{x} &7Y: &f{y} &7Z: &f{z}&7)"
  chunk: "&f{world} &7(X: &f{x} &7Z: &f{z}&7)"

  player-regions: "&7• &f{region}&r"
  player-regions-joining: "
"

  region-members: "&7• &e{playername}&r"
  region-members-joining: "
"

  gui-pagination-title: "&r{title} &r&8| &7{current-page}&8/&f{total-pages}&r"

  war-regions: "&f{region}&r"
  war-regions-joining: ", "

  private-chat: "&8[&fracked.ru&8]&r &8[&f{region}&8]&r &e{sender}&7: &r{message}"
