Main Configuration
The config.yml file is the heart of PrimeChat, containing all primary settings for chat formatting, security features, and general plugin behavior.
File Structure
Location
plugins/PrimeChat/config.yml
Auto-Generation
The configuration file is automatically created with default values when PrimeChat starts for the first time.
General Settings
Plugin Behavior
# General plugin settings
settings:
  # Plugin debug mode
  debug: false
  
  # Enable update notifications
  update-check: true
  
  # Plugin metrics (anonymous usage data)
  metrics: true
  
  # Message centering system
  center-messages:
    enabled: true
    messages-to-center:
      - "chat.cleared"
      - "chat.locked" 
      - "chat.unlocked"Debug Options
debug:
  # General debug information
  enabled: false
  
  # Specific debug categories
  chat-processing: false
  security-checks: false
  placeholder-api: false
  command-execution: false
  gui-interactions: falseChat Configuration
Basic Chat Format
chat:
  # Main chat format template
  # Available placeholders: %player_name%, %message%, and any PlaceholderAPI placeholder
  format: "&#E0E0E0<%rank%&r&#E0E0E0> %player_name% 󙀸»&#FDFDFD %message%"
  
  # Fallback format when PlaceholderAPI is not available
  fallback-format: "<%player_name%> %message%"Format Examples
Simple Format
format: "<%player_name%> %message%"Rank-Based Format
format: "[%vault_rank%] %player_name%: %message%"Advanced Colored Format
format: "&#FFD700[&#FFFFFF%vault_rank%&#FFD700] &#FFFFFF%player_name% 󙀸→ &#D3D3D3%message%"Gradient Format
format: "<#FF0000>%player_name%</#FF5500> &#FFFFFF: %message%"Hover Information
chat:
  hover:
    # Enable hover text when mousing over player names
    enabled: true
    
    # Lines of text to display in hover tooltip
    lines:
      - "�BFFF&lPlayer Information"
      - ""
      - "&#FFA500Player: &#FFFFFF%player_name%"
      - "&#FFA500Rank: &#FFFFFF%vault_rank%"
      - "&#FFA500Balance: &#FFFFFF%vault_eco_balance_formatted%"
      - "&#FFA500Health: &#FFFFFF%player_health%/%player_max_health%"
      - "&#FFA500Location: &#FFFFFF%player_world%"
      - ""
      - " CD32Click to send a private message!"Hover Features
- Rich Information: Display any PlaceholderAPI data 
- Color Support: Full hex color and gradient support 
- Click Actions: Configure click events (future feature) 
- Dynamic Content: Updates based on player status 
Private Messaging
Message Formats
private-messaging:
  # Format shown to the person sending the message
  sender-format: "&#FF69B4&o(To %receiver%)&r&#D3D3D3: %message%"
  
  # Format shown to the person receiving the message  
  receiver-format: "&#FF69B4&o(From %sender%)&r&#D3D3D3: %message%"
  
  # Format for spy mode (admins monitoring messages)
  spy-format: "&#FFD700[SPY] &#FFFFFF%sender% 󙀸→ &#FFFFFF%receiver%󙀸: &#D3D3D3%message%"Advanced Messaging Options
private-messaging:
  # Sound effects
  sounds:
    sender: "BLOCK_NOTE_BLOCK_PLING"
    receiver: "BLOCK_NOTE_BLOCK_PLING"
    volume: 1.0
    pitch: 1.0
  
  # Message storage
  logging:
    enabled: true
    format: "[%timestamp%] [PM] %sender% -> %receiver%: %message%"
    file: "private-messages.log"
  
  # Social features
  social:
    # Remember conversations across server restarts
    persistent-replies: true
    # Maximum number of stored conversations per player
    max-conversations: 10Security Features
Anti-Spam System
security:
  anti-spam:
    # Enable anti-spam protection
    enabled: true
    
    # Cooldown between messages (in seconds)
    cooldown: 3
    
    # Maximum identical messages before longer cooldown
    identical-message-limit: 2
    
    # Extended cooldown for repeated identical messages
    extended-cooldown: 10Blocked Words Filter
security:
  blocked-words:
    # Enable word filtering
    enabled: true
    
    # Words to block (case-insensitive)
    words:
      - "badword1"
      - "badword2" 
      - "inappropriate"
      - "offensive"
    
    # Action when blocked word is detected
    action: "block"  # Options: block, warn, replace
    
    # Replacement character for censoring
    replacement-char: "*"
    
    # Strict mode (blocks words within other words)
    strict-mode: falseAnti-Advertising Protection
security:
  anti-advertising:
    # Master toggle
    enabled: true
    
    # Block IPv4 addresses (e.g., 192.168.1.1)
    block-ipv4: true
    
    # Block domain names (e.g., example.com)
    block-domains: true
    
    # Block web links (e.g., http://example.com)
    block-links: true
    
    # Whitelist specific domains
    whitelist:
      - "youtube.com"
      - "discord.gg"
      - "imgur.com"
    
    # Detection locations
    detection:
      # Monitor public chat
      chat: true
      # Monitor command arguments
      commands: true
      # Monitor sign text
      signs: true
      # Monitor anvil renaming
      anvils: false
      # Monitor book content
      books: false
    
    # Custom message when advertising is detected
    message: "&#FF4747✖ &#FFFFFFAdvertising is not allowed on this server!"Chat Lock System
security:
  chat-lock:
    # Current lock status (automatically managed)
    is-locked: false
    
    # Allow staff to auto-unlock after time period
    auto-unlock: 
      enabled: false
      duration: 300  # seconds
    
    # Custom lock message
    lock-message: "&#FF6B6B📢 &#FFFFFFChat has been locked by an administrator!"
    unlock-message: " CD32📢 &#FFFFFFChat has been unlocked!"Integration Settings
PlaceholderAPI
placeholderapi:
  # Enable PlaceholderAPI integration
  enabled: true
  
  # Cache placeholders for performance
  cache:
    enabled: true
    duration: 30  # seconds
  
  # Refresh player-specific placeholders
  refresh-interval: 60  # seconds
  
  # Fallback values when placeholders fail
  fallbacks:
    "%vault_rank%": "Player"
    "%vault_eco_balance%": "0"Vault Integration
vault:
  # Enable Vault integration
  enabled: true
  
  # Use primary permission group as rank
  use-primary-group: true
  
  # Economy integration
  economy:
    enabled: true
    format: "$%,.2f"  # Format for displaying moneySound System
sounds:
  # Master sound toggle
  enabled: true
  
  # Default volume and pitch
  volume: 1.0
  pitch: 1.0
  
  # Specific sound events
  events:
    chat-lock: "BLOCK_ANVIL_PLACE"
    chat-unlock: "BLOCK_ANVIL_BREAK"
    clear-chat: "ENTITY_GENERIC_SPLASH"
    private-message: "BLOCK_NOTE_BLOCK_PLING"
    game-win: "ENTITY_PLAYER_LEVELUP"
    security-block: "BLOCK_ANVIL_LAND"Performance Settings
Optimization Options
performance:
  # Async chat processing
  async-processing: true
  
  # Maximum players per processing tick
  max-players-per-tick: 50
  
  # Cache frequently used data
  caching:
    player-data: true
    permission-checks: true
    placeholder-values: true
  
  # Memory management
  memory:
    # Clean up old data automatically
    auto-cleanup: true
    # Cleanup interval in minutes
    cleanup-interval: 30Database Settings
database:
  # Database type: sqlite, mysql
  type: "sqlite"
  
  # SQLite settings
  sqlite:
    file: "primechat.db"
  
  # MySQL settings (if using MySQL)
  mysql:
    host: "localhost"
    port: 3306
    database: "primechat"
    username: "user"
    password: "password"
    pool-size: 10Advanced Features
Custom Commands Integration
custom-commands:
  # Allow custom chat commands
  enabled: false
  
  # Custom command prefix
  prefix: "!"
  
  # Available commands
  commands:
    "!discord": 
      message: "Join our Discord: discord.gg/example"
      permission: "none"
    "!rules":
      message: "Read the rules at /spawn!"
      permission: "none"Multi-World Support
multi-world:
  # Enable per-world settings
  enabled: false
  
  # World-specific configurations
  worlds:
    "survival":
      format: "[Survival] %player_name%: %message%"
      anti-spam: true
    "creative":
      format: "[Creative] %player_name%: %message%"
      anti-spam: falseAPI Settings
api:
  # Enable developer API
  enabled: false
  
  # API key for external integrations
  key: "your-api-key-here"
  
  # Allowed IP addresses for API access
  allowed-ips:
    - "127.0.0.1"
    - "192.168.1.0/24"Configuration Validation
Syntax Checking
PrimeChat automatically validates configuration syntax:
- YAML Format: Ensures proper YAML structure 
- Value Types: Validates data types (strings, numbers, booleans) 
- Range Checks: Ensures numeric values are within acceptable ranges 
- Dependency Checks: Verifies required plugins are available 
Error Handling
# Error handling behavior
error-handling:
  # How to handle configuration errors
  on-error: "disable-feature"  # Options: disable-feature, use-default, stop-plugin
  
  # Log configuration warnings
  log-warnings: true
  
  # Backup configuration before changes
  backup-configs: trueMigration and Updates
Version Compatibility
# Configuration version (automatically managed)
config-version: 5
# Migration settings
migration:
  # Automatically update old configurations
  auto-update: true
  
  # Backup old configs during migration
  backup-old: true
  
  # Notify admins about configuration changes
  notify-changes: trueBackup System
backup:
  # Automatic backup intervals
  auto-backup:
    enabled: true
    interval: 1440  # minutes (24 hours)
  
  # Backup retention
  retention:
    keep-daily: 7    # Keep 7 daily backups
    keep-weekly: 4   # Keep 4 weekly backups
    keep-monthly: 3  # Keep 3 monthly backupsDefault Configuration Template
Here's a complete minimal configuration:
# ====================================================================================================
#
# PrimeChat Configuration File
#
# Thank you for using PrimeChat!
# For support: https://discord.gg/XTcKTG6vZP
#
# ====================================================================================================
settings:
  center-messages:
    enabled: true
    messages-to-center:
      - "chat.cleared"
      - "chat.locked"
      - "chat.unlocked"
chat:
  format: "&#E0E0E0<%vault_rank%&r&#E0E0E0> %player_name% 󙀸»&#FDFDFD %message%"
  hover:
    enabled: true
    lines:
      - "�BFFF&lPlayer Information"
      - ""
      - "&#FFA500Player: &#FFFFFF%player_name%"
      - "&#FFA500Rank: &#FFFFFF%vault_rank%"
      - "&#FFA500Balance: &#FFFFFF%vault_eco_balance_formatted%"
      - "&#FFA500Health: &#FFFFFF%player_health%/%player_max_health%"
private-messaging:
  sender-format: "&#FF69B4&o(To %receiver%)&r&#D3D3D3: %message%"
  receiver-format: "&#FF69B4&o(From %sender%)&r&#D3D3D3: %message%"
security:
  anti-spam:
    enabled: true
    cooldown: 3
  
  blocked-words:
    enabled: true
    words:
      - "badword1"
      - "badword2"
  
  chat-lock:
    is-locked: false
  
  anti-advertising:
    enabled: true
    block-ipv4: true
    block-domains: true
    block-links: true
    detection:
      chat: true
      commands: true
      signs: true
    message: "&#FF4747✖ &#FFFFFFAdvertising is not allowed on this server!"Last updated