Configuration
This guide covers all configuration options available in AnnouncementGUI.
📁 Configuration Files
AnnouncementGUI uses several configuration files:
config.yml- Main plugin configurationgui-messages.yml- GUI messages and promptsguis/*.yml- GUI layout configurations
🔧 Main Configuration (config.yml)
Full Configuration Example
# AnnouncementGUI configuration
# Local server identifier for this instance
localServerId: "server-1"
# List of known server IDs admins can choose from in the GUI
servers:
- "server-1"
- "server-2"
- "server-3"
# If true, servers will run announcements with target = ALL
enableAllServersAnnouncements: true
# How often (in seconds) the change poller checks for announcement updates on MySQL (lightweight, no special privileges needed)
# Only applies when using MySQL; defaults to 10 seconds for fast cross-server sync
changePollingIntervalSeconds: 10
# Storage configuration for announcements (shared across servers)
storage:
type: sqlite # sqlite or mysql
sqlite:
file: announcements.db
mysql:
host: localhost
port: 3306
database: announcements
username: root
password: password
params: "useSSL=false&serverTimezone=UTC"⚙️ Configuration Options Explained
Server Configuration
localServerId
localServerIdType: String
Default:
"server-1"Description: Unique identifier for this server instance. Used to target specific servers for announcements.
Example:
servers
serversType: List of Strings
Default:
["server-1", "server-2", "server-3"]Description: List of all server IDs in your network. These appear as options when creating announcements.
Example:
enableAllServersAnnouncements
enableAllServersAnnouncementsType: Boolean
Default:
trueDescription: When enabled, this server will run announcements that target "ALL" servers.
Example:
Use Cases:
Set to
trueon all servers for network-wide announcementsSet to
falseon specific servers to exclude them from ALL announcements
Polling Configuration
changePollingIntervalSeconds
changePollingIntervalSecondsType: Integer
Default:
10Description: How often (in seconds) the plugin checks for changes when using MySQL. Lower values = faster sync but more database queries.
Example:
Recommendations:
Small networks (2-5 servers): 5-10 seconds
Medium networks (5-15 servers): 10-15 seconds
Large networks (15+ servers): 15-30 seconds
Storage Configuration
SQLite Storage
When to use: Single server or servers sharing a filesystem.
Options:
file: Name of the SQLite database file (stored in plugin folder)
Advantages:
No additional setup required
Simple and reliable
Good for single servers
Limitations:
Not ideal for multi-server networks
No real-time cross-server sync
MySQL Storage
When to use: Multi-server networks requiring real-time synchronization.
Options:
host: MySQL server hostname or IP addressport: MySQL server port (default: 3306)database: Database name for announcementsusername: MySQL usernamepassword: MySQL password (use strong passwords!)params: Additional JDBC connection parameters
Common Parameters:
Advantages:
Real-time multi-server synchronization
Centralized announcement management
Automatic change detection
📝 GUI Messages Configuration (gui-messages.yml)
Full Configuration Example
Message Customization
You can customize all messages using:
Color Codes: Use
&codes (e.g.,&afor green,&cfor red)Formatting:
&l(bold),&o(italic),&n(underline),&m(strikethrough)Reset:
&rto reset formatting
Message Placeholders
Some messages support placeholders:
%servers%: Replaced with comma-separated list of server IDs
🎨 GUI Configuration Files
GUI layout files are located in plugins/AnnouncementGUI/guis/. These files control:
GUI size and title
Item positions and materials
Item names and lore
Click actions
Example GUI Configuration
Note: Modifying GUI files requires server restart/reload to take effect.
🔄 Reloading Configuration
📋 Configuration Examples
Example 1: Single Server Setup
Example 2: Multi-Server Network (MySQL)
Server 1 (Lobby):
Server 2 (Survival):
Example 3: Hub Server (Only ALL Announcements)
Example 4: Game Server (Specific + ALL)
🔒 Security Best Practices
Use strong MySQL passwords
Create a dedicated MySQL user
Enable SSL for MySQL (if over internet)
Restrict file permissions on config files
🐛 Configuration Troubleshooting
Next Steps:
Commands Guide - Learn available commands
Multi-Server Setup - Detailed multi-server guide
GUI Guide - How to use the interface