Theme
Targets & Sync β
Targeting is the part that decides whether an announcement should run on the current server. Sync is the part that moves changes between servers.
Target Types β
AnnouncementGUI supports five target modes.
LOCAL β
Broadcast only on the server that originally created the announcement.
How it works:
- each announcement stores
owner-server-id - the current server matches only when
owner-server-id == server.id
Use this when:
- you are managing one Paper server
- you want an announcement that stays private to the creator server even when sync is enabled
SERVER β
Broadcast only on one specific server ID.
Example target value:
text
lobby-1SERVERS β
Broadcast on multiple specific server IDs.
Example target values:
text
lobby-1, lobby-2, survival-1GROUP β
Broadcast on every server whose server.groups contains one of the configured group values.
Example target value:
text
lobbyIf the current server has:
yml
groups:
- "lobby"
- "network"then a GROUP announcement targeting lobby will match.
GLOBAL β
Broadcast everywhere.
This is the broadest mode. On a multi-server setup, it still depends on sync or shared data propagation. GLOBAL means βallowed everywhere,β not βtelepathically copied everywhere.β
Setting Targets in the GUI β
Inside the editor:
- left click the target item to cycle through target types
- right click to enter target values when the type requires them
Target values are entered as comma-separated text.
Redis Sync Overview β
When sync.enabled: true, AnnouncementGUI starts a Redis Pub/Sub service.
The plugin publishes these event types:
- announcement upsert
- announcement delete
- force broadcast request
Other servers listening on the same channel receive the event and update local storage or trigger the requested broadcast.
Required Redis Rules β
For network sync to work correctly:
- every server must have a unique
server.id - all syncing servers must use the same Redis URI
- all syncing servers must use the same Redis channel
- the plugin version and config structure should stay aligned across the network
Example Network Setup β
Lobby server β
yml
server:
id: "lobby-1"
groups:
- "lobby"Survival server β
yml
server:
id: "survival-1"
groups:
- "survival"Shared Redis block β
yml
sync:
enabled: true
type: "REDIS"
redis:
uri: "redis://:password@redis.example.com:6379/0"
channel: "announcementgui:sync"Practical Target Examples β
Local welcome panel β
- target type:
LOCAL - no target values
- result: only the owner server runs it
One specific lobby β
- target type:
SERVER - target values:
lobby-1
Two survival instances β
- target type:
SERVERS - target values:
survival-1, survival-2
All lobby servers β
- target type:
GROUP - target values:
lobby
Entire network β
- target type:
GLOBAL - no target values
Important Limitations β
The current implementation uses:
- local YAML storage on each server
- Redis events for change propagation
That means:
- Redis is not a shared database
- a server that is offline during an event can miss the update
- YAML still exists on every server independently after sync
If you need stronger consistency than that, the next step would be shared SQL storage, which is not implemented in this plugin yet.
Good Operating Rules β
- keep
server.idshort and predictable - keep group names lowercase and consistent
- use
LOCALfor server-specific content created by staff on one server - use
GROUPfor category-wide announcements - use
GLOBALonly when the message really belongs everywhere
