Skip to content

Create your first announcement

This guide creates a framed “Shop” announcement, tests it, then schedules it every 15 minutes for players in the survie world.

  1. Open plugins/CobaltiaAnnonces/annonces.json.

    Every section is optional. If you start from the sample file, keep the titre and cadres blocks: they provide the simple frame used below.

  2. Add the announcement under annonces.

    The key (boutique) is the id used by commands and rotations. The nom (name) is only shown in the menu and in confirmations.

    "annonces": {
    "boutique": {
    "nom": "Shop",
    "cadre": "simple",
    "lignes": [
    "<gray>Check out what's new in the shop!",
    "",
    "<click:run_command:'/boutique'><hover:show_text:'<gray>Open'><white><u>/boutique</u></white></hover></click>"
    ],
    "son": "entity.experience_orb.pickup"
    }
    }

    The empty string "" inserts a blank line. The frame title is added automatically; add "titre": false to hide it.

  3. Reload the file.

    /annonces reload

    On success, the plugin shows how many announcements, zones, rotations and entries were loaded. On error, the previous configuration stays active and each error is reported with its path, for example annonces.boutique.cadre : cadre inconnu « simpel ».

  4. Preview it for yourself only.

    /annonces apercu boutique

    You can also open /annonces and right-click the announcement.

  5. Send it manually.

    /annonces envoyer boutique tous
    /annonces envoyer boutique monde survie
    /annonces envoyer boutique joueur Steve
  6. Schedule it with a rotation.

    Add an item to the rotations list:

    "rotations": [
    {
    "id": "survie",
    "toutes": "15m",
    "ordre": "suite",
    "annonces": ["boutique"],
    "cible": { "monde": "survie" },
    "actif": true
    }
    ]

    Reload with /annonces reload. The first send happens 15 minutes after loading.

  7. Control the rotation.

    /annonces rotation survie maintenant
    /annonces rotation survie off
    /annonces rotation survie on

    maintenant (now) sends the next announcement right away and restarts the countdown. on and off turn the rotation on or off; that state is saved and survives restarts.