Configuration
The whole configuration lives in plugins/CobaltiaAnnonces/annonces.json. The file is strict JSON: no comments, double quotes, and no trailing comma after the last item of a list or object. Keys are in French; each one is explained below.
Overall structure
Section titled “Overall structure”{ "titre": { "texte": "...", "largeur": 44 }, "cadres": { "<id>": { ... } }, "annonces": { "<id>": { ... } }, "zones": { "<id>": { ... } }, "rotations": [ { ... } ], "entrees": [ { ... } ]}| Key | Type | Purpose |
|---|---|---|
titre |
object | Title shown at the top of framed announcements. |
cadres |
object of objects | Decorative frames, keyed by id. |
annonces |
object of objects | The announcements, keyed by id. |
zones |
object of objects | Named zones (WorldGuard region or cube), used by targeting and entries. |
rotations |
list | Automatic sends at a fixed interval. |
entrees |
list | Entries: announcements shown when a player enters a zone. |
Every key is optional: a missing section is simply empty. Unknown keys are ignored.
Duration format
Section titled “Duration format”Durations (toutes, delai_par_joueur) are written as numbers followed by a unit: s (seconds), m (minutes), h (hours), d (days). Units can be combined and spaces are ignored.
| Example | Duration |
|---|---|
"90s" |
1 minute 30 seconds |
"15m" |
15 minutes |
"1h30m" |
1 hour 30 minutes |
"1d" |
24 hours |
A zero, empty or otherwise formatted duration ("5 min", "1.5h") is rejected.
The title is inserted, centered, right below the frame top of every framed announcement (unless the announcement disables it).
"titre": { "texte": "<glyph:annonce_titre>", "largeur": 44}| Field | Type | Required | Description |
|---|---|---|---|
texte |
MiniMessage text | yes | Title content: a glyph or formatted text. |
largeur |
integer (pixels) | no | Rendered width of the title, used to center it. 0 if missing. |
Without a titre block, the plugin uses <glyph:annonce_titre> with a width of 44 pixels.
cadres
Section titled “cadres”A frame adds a decorative line above and below the announcement and sets the width within which the title and lines are centered.
"cadres": { "simple": { "haut": "<glyph:annonce_simple_haut_g><font:cobaltia:bandeau></font><glyph:annonce_simple_haut_d>", "bas": "<glyph:annonce_simple_bas_g><font:cobaltia:bandeau></font><glyph:annonce_simple_bas_d>", "largeur": 241 }, "simple_petit": { "haut": "<glyph:annonce_simple_petit_haut>", "bas": "<glyph:annonce_simple_petit_bas>", "largeur": 129, "vides_apres_haut": 1 }}| Field | Type | Required | Description |
|---|---|---|---|
haut |
MiniMessage text | yes | Top line, shown first. |
bas |
MiniMessage text | yes | Bottom line, shown last. |
largeur |
integer (pixels) > 0 | yes | Inner frame width; the reference used to center the title and lines. |
vides_apres_haut |
integer ≥ 0 | no | Number of blank lines inserted below the frame top. 0 by default. |
Centering measures each line to the pixel (Minecraft font, bold included, plus glyphs known to the Cobaltia server) and shifts it by half the free space. A line wider than the frame is not shifted.
annonces
Section titled “annonces”Each announcement is an object whose key is its id (used by commands, rotations and entries).
"annonces": { "vote": { "nom": "Vote reminder", "cadre": "simple", "lignes": [ "<gray>Vote for the server with <click:run_command:'/vote'><hover:show_text:'<gray>Vote'><white><u>/vote</u></white></hover></click>!" ], "son": "entity.experience_orb.pickup" }, "bienvenue": { "lignes": [ "<gradient:#5FD3FF:#1E6BFF>Welcome %player_name%!</gradient>", "", "<gray>Type <white>/help</white> to get started." ] }}| Field | Type | Required | Description |
|---|---|---|---|
lignes |
list of MiniMessage texts | yes (at least one) | Announcement lines, one entry per chat line. "" produces a blank line. PlaceholderAPI placeholders are replaced for each recipient. |
nom |
text | no | Display name shown in the menu and in the send confirmation. Defaults to the id. |
cadre |
frame id | no | Frame to use (must exist under cadres). Without a frame, lines are sent as-is, with no title or centering. |
titre |
boolean | no | With a frame, true by default: shows the title. Set false to omit it. No effect without a frame. |
son |
Minecraft sound key | no | Sound played to each recipient, for example entity.experience_orb.pickup or block.note_block.pling. An invalid key is silently ignored. |
In the example, vote is framed and centered, with its title and a sound; bienvenue is sent line by line, without a frame.
A zone is a named area of a world. It is used as a target for sends and rotations, and as a trigger for entries. There are two kinds:
"zones": { "spawn": { "monde": "world", "region": "spawn" }}| Field | Description |
|---|---|
monde |
World name (required). |
region |
Id of the WorldGuard region in that world. |
A player is in the zone as soon as the region applies at their position. WorldGuard is required: without it, these zones are always empty.
"zones": { "arene": { "monde": "survie", "min": [100000, -64, 100000], "max": [100010, 320, 100010] }}| Field | Description |
|---|---|
monde |
World name (required). |
min |
First corner: a list of three integers [x, y, z]. |
max |
Opposite corner: a list of three integers [x, y, z]. |
Corners may be given in any order; bounds are inclusive and compared with the player’s block coordinates. No plugin is required.
If region is present, it takes precedence over min/max. A zone with neither region nor valid corners is rejected.
Targeting
Section titled “Targeting”A rotation’s cible (target) field accepts four forms:
| Form | Recipients |
|---|---|
"tous" (or missing field) |
All online players. |
{ "monde": "survie" } |
Players in one world. |
{ "mondes": ["survie", "survie_nether"] } |
Players in several worlds. monde and mondes can be combined. |
{ "zone": "spawn" } |
Players inside the zone at send time. The zone must exist under zones. |
Recipients are computed on each send. If nobody is in the target, the automatic send is simply skipped.
rotations
Section titled “rotations”A rotation sends one of its announcements at a fixed interval.
"rotations": [ { "id": "general", "toutes": "10m", "ordre": "hasard", "annonces": ["vote", "boutique", "discord"], "cible": "tous", "actif": true }, { "id": "spawn", "toutes": "5m", "ordre": "suite", "annonces": ["bienvenue"], "cible": { "zone": "spawn" } }]| Field | Type | Required | Description |
|---|---|---|---|
id |
text | yes | Unique rotation id, used by /annonces rotation. |
toutes |
duration | yes | Interval between two sends (every). |
annonces |
list of ids | yes (at least one) | Announcements to broadcast; each must exist under annonces. |
ordre |
"suite" or "hasard" |
no | Order: suite (default) goes through the list in order and starts over; hasard picks one at random, never repeating the previous one. |
cible |
target | no | Recipients (see Targeting). "tous" by default. |
actif |
boolean | no | Initial state (active), true by default. |
How it works:
- the first send happens one full interval after startup or reload;
- the plugin checks rotations every second; several rotations can run in parallel, each at its own pace;
- in the example,
generalbroadcasts a random announcement every 10 minutes to the whole server, andspawnsendsbienvenueevery 5 minutes to players at spawn only.
entrees
Section titled “entrees”An entry shows an announcement to a player at the moment they enter a zone.
"entrees": [ { "zone": "arene", "annonce": "regles_arene", "delai_par_joueur": "30m" }]| Field | Type | Required | Description |
|---|---|---|---|
zone |
zone id | yes | Watched zone (must exist under zones). |
annonce |
announcement id | yes | Announcement sent to the entering player. |
delai_par_joueur |
duration | no | Per-player delay: minimum time before the same player receives this announcement again for this zone. 30m by default. |
How it works:
- entry is detected when the player moves to another block, teleports, changes world or joins directly inside the zone;
- the announcement is sent only to that player, and only if they were not already in the zone;
- several entries can target the same zone (one announcement each);
- the anti-repeat delay is kept in memory across reloads, but reset when the server restarts.
Complete example
Section titled “Complete example”{ "titre": { "texte": "<glyph:annonce_titre>", "largeur": 44 }, "cadres": { "simple": { "haut": "<glyph:annonce_simple_haut_g><font:cobaltia:bandeau></font><glyph:annonce_simple_haut_d>", "bas": "<glyph:annonce_simple_bas_g><font:cobaltia:bandeau></font><glyph:annonce_simple_bas_d>", "largeur": 241 } }, "annonces": { "vote": { "nom": "Vote reminder", "cadre": "simple", "lignes": ["<gray>Vote for the server with <white>/vote</white>!"], "son": "entity.experience_orb.pickup" }, "bienvenue_spawn": { "nom": "Spawn welcome", "lignes": ["<gray>Welcome to spawn, <white>%player_name%</white>!"] } }, "zones": { "spawn": { "monde": "world", "region": "spawn" } }, "rotations": [ { "id": "general", "toutes": "10m", "annonces": ["vote"], "cible": "tous" } ], "entrees": [ { "zone": "spawn", "annonce": "bienvenue_spawn", "delai_par_joueur": "1h" } ]}This file broadcasts the framed vote reminder every 10 minutes to the whole server, and welcomes every player entering the spawn region, at most once per hour per player.
Key reference
Section titled “Key reference”27 results
titre.texteMiniMessage text of the title shown at the top of framed announcements, usually a glyph.
titre.largeurTitle width in pixels, used to center it inside the frame.
cadres.<id>.hautMiniMessage line shown at the top of frame <id> (top border).
cadres.<id>.basMiniMessage line shown at the bottom of frame <id> (bottom border).
cadres.<id>.largeurInner frame width in pixels, required and positive, used to center the title and lines.
cadres.<id>.vides_apres_hautNumber of blank lines inserted below the frame's top border (0 by default).
annonces.<id>.nomReadable name of the announcement, shown in the menu and command feedback; the id is used if missing.
annonces.<id>.cadreId of a frame defined in cadres; without a frame, lines are sent as is, without centering.
annonces.<id>.lignesList of MiniMessage lines of the announcement, at least one, with PlaceholderAPI placeholders; an empty line adds a gap.
annonces.<id>.sonMinecraft sound played to each recipient (sound key, for example entity.experience_orb.pickup); no sound if missing.
annonces.<id>.titreShows the shared title at the top of the framed announcement (true by default); no effect if the announcement has no frame.
zones.<id>.regionWorldGuard region that defines the zone; otherwise the zone is a cuboid defined by min and max.
zones.<id>.mondeName of the world the zone is in, required.
zones.<id>.minFirst [x, y, z] corner of the cuboid zone, used when no region is set.
zones.<id>.maxOpposite [x, y, z] corner of the cuboid zone, used when no region is set.
rotations[].idUnique id of the rotation, used by /annonces rotation.
rotations[].toutesInterval between two announcements of the rotation, as a combinable duration in s, m, h, d (for example 5m or 1h30m).
rotations[].ordreBroadcast order: suite (list order) or hasard (random, never repeating the previous one).
rotations[].annoncesList of announcement ids broadcast by the rotation, at least one.
rotations[].cibleRotation recipients: tous, or an object giving monde, mondes or zone.
rotations[].actifInitial state of the rotation (true by default); a state changed with /annonces rotation takes priority.
rotations[].cible.zoneLimits the rotation to players inside this zone (id defined in zones).
rotations[].cible.mondeLimits the rotation to players in this world.
rotations[].cible.mondesLimits the rotation to players in any of the worlds in this list.
entrees[].zoneZone whose entry triggers the announcement for the player entering it.
entrees[].annonceId of the announcement sent to the player when entering the zone.
entrees[].delai_par_joueurMinimum delay before sending this announcement again to the same player, as an s, m, h, d duration (30m by default).
- No entries.