GUI Configuration

The gui.yml file controls all aspects of PrimeChat's Admin GUI interface, including panel titles, item materials, slot positions, and visual feedback.

File Location

plugins/PrimeChat/gui.yml

GUI Structure Overview

PrimeChat's Admin GUI consists of multiple interconnected panels:

  • Main Panel: Entry point with Actions and Settings buttons

  • Actions Panel: Quick chat management (lock/unlock, clear, games)

  • Settings Panel: Category selection for different settings types

  • Chat Settings Panel: Chat-specific configuration options

  • Security Settings Panel: Security features configuration

  • Detection Settings Panel: Detection system configuration

Panel Titles

titles:
  main-panel: "&#FF6347&lPrimeChat &#4D4D4D- &#E0E0E0Admin Panel"
  actions-panel: "&#FF6347&lPrimeChat &#4D4D4D- &#E0E0E0Actions"
  settings-panel: "&#FF6347&lPrimeChat &#4D4D4D- &#E0E0E0Settings"
  chat-settings-panel: "&#FF6347&lPrimeChat &#4D4D4D- &#E0E0E0Chat Settings"
  security-settings-panel: "&#FF6347&lPrimeChat &#4D4D4D- &#E0E0E0Security Settings"
  detection-settings-panel: "&#FF6347&lPrimeChat &#4D4D4D- &#E0E0E0Detection Settings"

Main Panel Configuration

Actions Button

main-panel:
  actions:
    material: DIAMOND_SWORD
    slot: 11
    name: "&#32CD32&lActions"
    lore:
      - "&#888888Click to access chat actions"
      - "&#888888• Toggle chat lock/unlock"
      - "&#888888• Clear chat"

Settings Button

main-panel:
  settings:
    material: REDSTONE
    slot: 15
    name: "&#FFA500&lSettings"
    lore:
      - "&#888888Click to configure plugin settings"
      - "&#888888• Toggle features on/off"
      - "&#888888• Adjust numeric values"

Actions Panel Configuration

Chat Lock Toggle

actions-panel:
  chat-lock:
    slot: 11
    locked:
      material: GREEN_WOOL
      name: "&#32CD32&lUnlock Chat"
      lore:
        - "&#888888Current status: &#FF4747Locked"
        - "&#888888Click to unlock the chat"
    unlocked:
      material: RED_WOOL
      name: "&#FF4747&lLock Chat"
      lore:
        - "&#888888Current status: &#32CD32Unlocked"
        - "&#888888Click to lock the chat"

Clear Chat Action

actions-panel:
  clear-chat:
    material: BUCKET
    slot: 13
    name: "&#FFA500&lClear Chat"
    lore:
      - "&#888888Click to clear the chat for all players"

Chat Games Action

actions-panel:
  chat-games:
    material: BOOK
    slot: 15
    name: "&#32CD32&lSend Chat Game"
    lore:
      - "&#888888Click to send a random chat game question"
      - "&#888888Players can answer to win rewards"

Back Button

actions-panel:
  back-button:
    material: ARROW
    slot: 22
    name: "&#FF4747&lBack"
    lore:
      - "&#888888Click to go back"

Settings Panel Configuration

Category Selection

settings-panel:
  chat-category:
    material: PAPER
    slot: 11
    name: "&#32CD32&lChat Settings"
    lore:
      - "&#888888Configure chat-related settings"
      - "&#888888• Message centering"
      - "&#888888• Chat hover effects"
  
  security-category:
    material: SHIELD
    slot: 13
    name: "&#FF4747&lSecurity Settings"
    lore:
      - "&#888888Configure security features"
      - "&#888888• Anti-spam protection"
      - "&#888888• Blocked words filter"
      - "&#888888• Anti-advertising system"
  
  detection-category:
    material: COMPASS
    slot: 15
    name: "&#FFA500&lDetection Settings"
    lore:
      - "&#888888Configure detection systems"
      - "&#888888• Chat detection"
      - "&#888888• Command detection"
      - "&#888888• Sign detection"

Chat Settings Panel

chat-settings-panel:
  center-messages:
    material: COMPASS
    slot: 11
    name: "&#E0E0E0&lCenter Messages"
    config-path: "settings.center-messages.enabled"
  
  chat-hover:
    material: ITEM_FRAME
    slot: 13
    name: "&#E0E0E0&lChat Hover"
    config-path: "chat.hover.enabled"

Security Settings Panel

security-settings-panel:
  anti-spam:
    material: CLOCK
    slot: 10
    name: "&#E0E0E0&lAnti-Spam"
    config-path: "security.anti-spam.enabled"
  
  anti-spam-cooldown:
    material: HOPPER
    slot: 19
    name: "&#E0E0E0&lAnti-Spam Cooldown"
    config-path: "security.anti-spam.cooldown"
    unit: "seconds"
    type: "number"
  
  blocked-words:
    material: BARRIER
    slot: 12
    name: "&#E0E0E0&lBlocked Words"
    config-path: "security.blocked-words.enabled"
  
  anti-advertising:
    material: SHIELD
    slot: 14
    name: "&#E0E0E0&lAnti-Advertising"
    config-path: "security.anti-advertising.enabled"
  
  block-ipv4:
    material: IRON_BARS
    slot: 16
    name: "&#E0E0E0&lBlock IPv4"
    config-path: "security.anti-advertising.block-ipv4"
  
  block-domains:
    material: IRON_DOOR
    slot: 21
    name: "&#E0E0E0&lBlock Domains"
    config-path: "security.anti-advertising.block-domains"
  
  block-links:
    material: CHAIN
    slot: 23
    name: "&#E0E0E0&lBlock Links"
    config-path: "security.anti-advertising.block-links"

Detection Settings Panel

detection-settings-panel:
  detect-chat:
    material: PAPER
    slot: 11
    name: "&#E0E0E0&lDetect in Chat"
    config-path: "security.anti-advertising.detection.chat"
  
  detect-commands:
    material: COMMAND_BLOCK
    slot: 13
    name: "&#E0E0E0&lDetect in Commands"
    config-path: "security.anti-advertising.detection.commands"
  
  detect-signs:
    material: OAK_SIGN
    slot: 15
    name: "&#E0E0E0&lDetect on Signs"
    config-path: "security.anti-advertising.detection.signs"

Item Templates

Toggle Item Template

toggle-item:
  enabled:
    material: LIME_DYE
    status-text: "&#32CD32Enabled"
    action-text: "disable"
  disabled:
    material: GRAY_DYE
    status-text: "&#FF4747Disabled"
    action-text: "enable"
  lore-template:
    - "&#888888Status: %status%"
    - "&#888888Click to %action%"
    - "&#FFC447Config: &#888888%config-path%"

Number Item Template

number-item:
  lore-template:
    - "&#888888Current value: &#32CD32%value% %unit%"
    - "&#888888Left click: +1"
    - "&#888888Right click: -1"
    - "&#888888Shift + Left click: +5"
    - "&#888888Shift + Right click: -5"
    - "&#FFC447Config: &#888888%config-path%"

Action Messages

messages:
  chat-locked: "&#FF4747✖ Chat has been locked."
  chat-unlocked: "&#32CD32✔ Chat has been unlocked."
  chat-cleared: "&#32CD32✔ Chat was cleared by &#E0E0E0%player%&r&#32CD32."
  setting-enabled: "&#32CD32✔ %setting% has been enabled"
  setting-disabled: "&#32CD32✔ %setting% has been disabled"
  value-updated: "&#32CD32✔ Updated %setting% to %value%"

Panel Sizes

sizes:
  main-panel: 27
  actions-panel: 27
  settings-panel: 27
  chat-settings-panel: 27
  security-settings-panel: 27
  detection-settings-panel: 27

GUI Features

Dynamic Updates

  • Current configuration values are displayed in real-time

  • Settings show current enabled/disabled status

  • Number values display current configuration

Click Controls

  • Left Click: Toggle settings or increment values

  • Right Click: Decrement numerical values

  • Shift + Click: Make larger adjustments (±5)

  • Back Buttons: Navigate between panels

Real-Time Configuration

  • Changes apply immediately when clicked

  • No need to restart server for most settings

  • Visual feedback shows current states

Customization Options

Visual Customization

# Custom materials for different states
toggle-item:
  enabled:
    material: EMERALD  # Custom enabled material
  disabled:
    material: REDSTONE  # Custom disabled material

# Custom colors in titles
titles:
  main-panel: "&#YOUR_COLOR&lCustom Title"

Layout Customization

# Adjust slot positions
main-panel:
  actions:
    slot: 10  # Move to different slot
  settings:
    slot: 16  # Move to different slot

# Change panel sizes
sizes:
  main-panel: 54  # Larger panel (6 rows)

Message Customization

messages:
  chat-locked: "&#FF0000Custom lock message"
  setting-enabled: "&#00FF00%setting% is now active!"
  value-updated: "&#FFFF00%setting% changed to %value%"

Advanced Features

Conditional Items

Items can be configured to show/hide based on conditions:

  • Permission-based: Show items only for specific permissions

  • Config-dependent: Show items only when related features are enabled

  • Dynamic Materials: Change materials based on complex conditions

Sound Integration

The GUI integrates with the sound system:

  • Click Sounds: Different sounds for different actions

  • Success Sounds: Audio feedback for successful changes

  • Error Sounds: Audio feedback for failed actions

Multi-Language Support

GUI text can be localized:

  • Title Translation: Support for multiple languages

  • Lore Translation: Localized descriptions

  • Message Translation: Localized feedback messages

Best Practices

Performance Considerations

  1. Efficient Updates: Only refresh changed items

  2. Async Operations: Heavy config operations off main thread

  3. Memory Management: Clean up unused GUI sessions

  4. Event Handling: Efficient click event processing

User Experience

  1. Clear Navigation: Obvious back buttons and breadcrumbs

  2. Visual Feedback: Immediate response to clicks

  3. Consistent Design: Same look and feel across panels

  4. Informative Tooltips: Clear descriptions in lore text

Security Considerations

  1. Permission Checks: Verify permissions before showing items

  2. Input Validation: Validate numeric inputs and ranges

  3. Config Validation: Ensure config changes are valid

  4. Access Control: Limit GUI access to authorized users

Last updated