Skip to content

Announcements ​

The proxy can broadcast a message to a server on an interval — the "server announcement" every network shows when nobody is talking.

Turning it on ​

yaml
announcements:
  enabled: true
  interval: "120s"

The interval is a duration: 30s, 5m, 1h. An interval of 0 switches the announcements off — the plugin says so in the log.

TIP

The enabled key is not read by the plugin. The interval is what decides whether the announcements run.

What to announce ​

The announcements themselves live in messages.yml, not in config.yml. Each announcement has a name of your own choosing and holds the lines of the message:

yaml
announcements:
  announcement-1:
    messages:
      - ""
      - "<yellow><bold>AppelTools<reset> <dark_gray>» <white>Wil je de server supporten?"
      - "Koop een rank op https://store.example.com en krijg er perks voor terug!"
      - ""
    click: "https://store.example.com"
    hover: "<green>Klik om naar de webstore te gaan!"
    suggest: "/store"
    server: null
FieldWhat it does
messagesThe lines of the announcement. A line is a MiniMessage text.
clickWhat the message does when a player clicks it: a command (/store) or a link (https://...). Leave it out for a plain message.
hoverThe text that appears when a player hovers over the message.
suggestThe command that is put in the chat bar of the player when they click. It has to start with /.
serverThe server the announcement belongs to. Leave it out and the announcement is shown on every server.

TIP

The click, the hover and the suggest are MiniMessage, so you can make the message clickable and give it a hover text at the same time:

yaml
click: '<click:open_url:"https://store.example.com"><yellow>Open de store</yellow></click>'
hover: "<green>Je krijg er perks voor terug!"

How it works ​

  • The proxy cycles through the announcements of a server, one after the other. When the last one has been shown, it starts over.
  • Every server has its own list and its own position in that list, so two servers do not show the same announcement at the same time.
  • The first announcement appears after half an interval, so the plugin does not shout the moment it starts.

An announcement with a server that the proxy does not know is skipped, and the plugin warns about it in the log. So does an announcement with a click that is neither a command nor a link, or with a suggest that is not a command.

Reading the file again ​

/atv reload reads the announcements again: the list, the interval and the text all change with it. The announcements that are on screen at that moment finish first.

Built with VitePress.