Commands
Complete reference for all AnnouncementGUI commands.
📋 Command Overview
AnnouncementGUI provides a single main command with multiple subcommands:
/announcegui
Open the main GUI
announcegui.admin
/announcegui export [filename]
Export announcements to JSON
announcegui.admin
/announcegui import <filename> [mode]
Import announcements from JSON
announcegui.admin
🎮 Main Command
/announcegui
/announceguiDescription: Opens the Announcement Manager GUI.
Usage:
/announceguiPermission: announcegui.admin
Examples:
/announceguiWhat it does:
Opens the main menu GUI
Allows you to create, edit, or delete announcements
Provides access to all announcement management features
Notes:
Must be executed by a player (not console)
Player must have the
announcegui.adminpermission
📤 Export Command
/announcegui export [filename]
/announcegui export [filename]Description: Exports all announcements to a JSON file in the plugin folder.
Usage:
Permission: announcegui.admin
Parameters:
[filename](optional): Name of the output fileDefault:
announcements.jsonExtension
.jsonis recommended but not required
What it does:
Exports all announcements from the database
Saves to a JSON file in the plugin folder
Includes all announcement data: name, messages, intervals, targets, status
Can be used for backups or transferring announcements
Output Example:
Use Cases:
Backup: Regular backups before making changes
Migration: Moving announcements to a new server
Testing: Export production data for testing environments
Version Control: Track announcement changes over time
📥 Import Command
/announcegui import <filename> [mode]
/announcegui import <filename> [mode]Description: Imports announcements from a JSON file in the plugin folder.
Usage:
Permission: announcegui.admin
Parameters:
<filename>(required): Name of the JSON file to importMust exist in the plugin folder
Include the
.jsonextension
[mode](optional): Import modemerge(default): Adds announcements to existing onesreplace: Deletes all existing announcements before importing
What it does:
Reads announcements from a JSON file
Adds them to the database (merge mode)
OR replaces all existing announcements (replace mode)
Validates JSON format before importing
Restarts announcement tasks as needed
Import Modes Explained:
merge
Adds new announcements, keeps existing
Importing additional announcements
replace
Deletes all, then imports
Fresh start, restoring from backup
JSON File Format:
The JSON file must be an array of announcement objects:
Required Fields:
id: Unique identifier (UUID or string)name: Display namelines: Array of message linesintervalSeconds: Interval in seconds (positive number)targetServerId: Target server ID or "ALL"enabled: Boolean (true/false)
Use Cases:
Restore: Restore from a previous backup
Migration: Move announcements from another server
Deployment: Deploy pre-configured announcements
Testing: Load test data
Error Messages (import/export)
🎯 Command Usage Scenarios
Scenario 1: Regular Backup
Create weekly backups:
Scenario 2: Server Migration
Moving to a new server:
Scenario 3: Testing Changes
Test changes safely:
Scenario 4: Multi-Server Deployment
Deploy same announcements to all servers:
Scenario 5: Merging Announcements
Combine announcements from two servers:
💡 Tips and Best Practices
Backup Strategy
Import Best Practices
Common Pitfalls to Avoid
❌ Don't: Use
replacemode without backing up first ✅ Do: Export current state before using replace mode❌ Don't: Edit JSON files manually without validation ✅ Do: Use a JSON validator before importing
❌ Don't: Import files with duplicate IDs ✅ Do: Ensure IDs are unique when merging
🔍 Command Aliases
Currently, there are no aliases for /announcegui. You must use the full command name.
🛠️ Command Permissions
All commands require the same permission:
Permission Node: announcegui.admin
Grant Permission:
Using LuckPerms:
Using PermissionsEx:
Using GroupManager:
Note: See the Permissions Guide for more details.
📞 Command Help
In-Game Help
If you forget command syntax, the plugin will show usage hints:
Console Usage
Note: The /announcegui command cannot be used from the console as it requires a player to open the GUI.
However, import/export operations could potentially be adapted for console use in future versions.
🐛 Troubleshooting Commands
Export Issues
Problem: "Failed to export announcements" Solutions:
Check plugin folder write permissions
Verify disk space available
Check server logs for detailed error
Import Issues
Related Documentation:
Permissions Guide - Detailed permission information
GUI Guide - Using the graphical interface
Configuration Guide - Plugin configuration
Troubleshooting - Common issues and solutions