Skip to content

GUI Workflow ​

AnnouncementGUI is designed around an inventory workflow. Staff do not need to edit YAML by hand for normal operations.

When a player runs /agui, the main menu opens with three primary actions:

  • Create Announcement
  • Edit Announcements
  • Delete Announcements

There is also a close item to exit the menu.

Create Flow ​

Choosing Create Announcement starts a fresh draft and opens the editor screen.

Editable fields ​

The editor exposes these fields:

  • Name: internal name used in lists and debugging
  • Title: centered panel header
  • Description: centered sub-lines under the title
  • Message Body: main announcement lines
  • Interval: broadcast interval in seconds
  • Target: target type and target values
  • Enabled: active or disabled state

There is also a preview item and a save item.

How Chat Input Works ​

Most editor fields are entered through chat prompts.

Rules you should know ​

  • type cancel to abort the current prompt
  • use | to split description or body into multiple lines
  • interval must be a positive number
  • target values are comma-separated

Example for a description prompt:

text
Main network panel|Visible on all lobby servers

Example for message lines:

text
<center>&6Store: store.example.com</center>|&eDiscord: discord.example.com|&aUse /spawn to begin

Target Item Behavior ​

The target item has two different actions:

  • Left click cycles the target type
  • Right click sets target values if the current type needs them

Not every target type needs values:

  • LOCAL does not need extra targets
  • GLOBAL does not need extra targets
  • SERVER, SERVERS, and GROUP do need target values

Validation Before Save ​

The save item shows validation status. Based on the source code, the draft is invalid when:

  • the message body is empty
  • the interval is 0 or lower
  • the target type is missing
  • the target type requires target values but none were provided

If the save succeeds, the plugin creates or updates the announcement and returns you to the main menu.

Edit Flow ​

Edit Announcements opens a paged list. Clicking one entry loads that announcement into the editor. The same validation and chat prompt rules still apply.

Useful details from the source:

  • list pages hold up to 45 announcements
  • the list is sorted by display name, then by UUID
  • editing an existing announcement increments its internal version

Delete Flow ​

Delete Announcements opens a list of saved announcements. Clicking an entry opens a confirmation menu.

The final delete confirmation:

  • removes the announcement from storage
  • removes it from the in-memory cache
  • publishes a delete sync event if network sync is enabled

A Good First Announcement ​

Use this simple flow for the first test:

  1. Open /agui
  2. Click Create Announcement
  3. Set Name to welcome
  4. Set Title to &6Welcome to %server%
  5. Set Description to &7Network announcement panel
  6. Set Message Body to &eDiscord: discord.example.com|&aStore: store.example.com
  7. Set Interval to 300
  8. Leave target type on LOCAL
  9. Keep it enabled
  10. Save

That gives you a local panel every five minutes on the server where it was created.

Built with Vue.js and VitePress