Skip to content

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.

{
"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.

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.

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.

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.

If region is present, it takes precedence over min/max. A zone with neither region nor valid corners is rejected.

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.

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, general broadcasts a random announcement every 10 minutes to the whole server, and spawn sends bienvenue every 5 minutes to players at spawn only.

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.
{
"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.

27 results

  • titre.texteFile annonces.jsonDefault <glyph:annonce_titre>

    MiniMessage text of the title shown at the top of framed announcements, usually a glyph.

  • titre.largeurFile annonces.jsonDefault 44

    Title width in pixels, used to center it inside the frame.

  • cadres.<id>.hautFile annonces.jsonDefault <glyph:annonce_simple_haut_g><font:cobaltia:bandeau></font><glyph:annonce_simple_haut_d>

    MiniMessage line shown at the top of frame <id> (top border).

  • cadres.<id>.basFile annonces.jsonDefault <glyph:annonce_simple_bas_g><font:cobaltia:bandeau></font><glyph:annonce_simple_bas_d>

    MiniMessage line shown at the bottom of frame <id> (bottom border).

  • cadres.<id>.largeurFile annonces.jsonDefault 241

    Inner frame width in pixels, required and positive, used to center the title and lines.

  • cadres.<id>.vides_apres_hautFile annonces.jsonDefault 0

    Number of blank lines inserted below the frame's top border (0 by default).

  • annonces.<id>.nomFile annonces.jsonDefault Test : cadre simple

    Readable name of the announcement, shown in the menu and command feedback; the id is used if missing.

  • annonces.<id>.cadreFile annonces.jsonDefault simple

    Id of a frame defined in cadres; without a frame, lines are sent as is, without centering.

  • annonces.<id>.lignesFile annonces.json

    List of MiniMessage lines of the announcement, at least one, with PlaceholderAPI placeholders; an empty line adds a gap.

  • annonces.<id>.sonFile annonces.jsonDefault entity.experience_orb.pickup

    Minecraft sound played to each recipient (sound key, for example entity.experience_orb.pickup); no sound if missing.

  • annonces.<id>.titreFile annonces.jsonDefault true

    Shows the shared title at the top of the framed announcement (true by default); no effect if the announcement has no frame.

  • zones.<id>.regionFile annonces.jsonDefault spawn

    WorldGuard region that defines the zone; otherwise the zone is a cuboid defined by min and max.

  • zones.<id>.mondeFile annonces.jsonDefault world

    Name of the world the zone is in, required.

  • zones.<id>.minFile annonces.jsonDefault [100000,-64,100000]

    First [x, y, z] corner of the cuboid zone, used when no region is set.

  • zones.<id>.maxFile annonces.jsonDefault [100010,320,100010]

    Opposite [x, y, z] corner of the cuboid zone, used when no region is set.

  • rotations[].idFile annonces.jsonDefault tests

    Unique id of the rotation, used by /annonces rotation.

  • rotations[].toutesFile annonces.jsonDefault 5m

    Interval between two announcements of the rotation, as a combinable duration in s, m, h, d (for example 5m or 1h30m).

  • rotations[].ordreFile annonces.jsonDefault suite

    Broadcast order: suite (list order) or hasard (random, never repeating the previous one).

  • rotations[].annoncesFile annonces.jsonDefault ["test_simple","test_simple_petit"]

    List of announcement ids broadcast by the rotation, at least one.

  • rotations[].cibleFile annonces.jsonDefault tous

    Rotation recipients: tous, or an object giving monde, mondes or zone.

  • rotations[].actifFile annonces.jsonDefault false

    Initial state of the rotation (true by default); a state changed with /annonces rotation takes priority.

  • rotations[].cible.zoneFile annonces.jsonDefault spawn

    Limits the rotation to players inside this zone (id defined in zones).

  • rotations[].cible.mondeFile annonces.json

    Limits the rotation to players in this world.

  • rotations[].cible.mondesFile annonces.json

    Limits the rotation to players in any of the worlds in this list.

  • entrees[].zoneFile annonces.jsonDefault exemple_cube

    Zone whose entry triggers the announcement for the player entering it.

  • entrees[].annonceFile annonces.jsonDefault test_simple_petit

    Id of the announcement sent to the player when entering the zone.

  • entrees[].delai_par_joueurFile annonces.jsonDefault 30m

    Minimum delay before sending this announcement again to the same player, as an s, m, h, d duration (30m by default).