Broadcaster plugin

Hi!

I am going to create a broadcaster plugin. I am looking for a name and a good config structure/feature. Any suggestions or requests?

Good name: Bullhorn

Good features: Able to define separate sections of messages. Each section has its own message groups and interval period. It cycles between each of its message groups, with the interval between. It’s message groups instead of single messages because I don’t think you can do newlines in the config with Texts.
So you can have several message cycles running concurrently (e.g. one for game tips, one for advertisements, etc.)

1 Like

Thanks for the suggestions!

Edit: Updated config

useCustomTextFormat = true
sections {
  tips {
    prefix = "&c[Tips] "
    interval = "10m"
    deactivatable = true
    messages [
      [
        "Don't craft gold tools, they are inefficient"
        "Don't dig straight down"
      ]
      [
        "Kill cows and cook their meat, it's delicious!"
      ]
    ]
  }
  ads {
    interval = 1h
    deactivatable = false 
    messages [
      [
        "[Click here](www.url.de) to vote"
      ]
    ]
  }
}

The gold tools and dig straight down tips will be sent as two Texts in row. After 10 minutes the food advice is sent. This goes on infinitely.
Every hour a text with a text click action to vote is sent. The link is crafted like with Markdown.

I think it’d be better if it just worked with normal Text, i.e. you just called getValue(TypeToken.of(Text.class)). The more extensible a plugin is, the better.

I have used that way of serialization in some of my plugins. Users of my plugins and I think that the config format of Texts is too complicated. Creating a “text click open url”-action in that config format is not simple.
But I agree with you. It’s more extensible(like running a command on click or showing text when hovering). How about a boolean in the config that sets whether the default serialization or the color codes with ampersands should be used? The messages are converted when running a command like /bullhorn useCustomFormat false.

This is interesting. Perhaps a way to disable it per-player as well?

I’d imagine a player who’s been on the server for a week already won’t need to see the ‘tips’ announcement so he could just /bullhorn disable tips; or shortcut /bh - but might get mistaken for banhammer XD

1 Like

Ah, good! In the config one can set sections to be deactivatable, so the ads sections can’t be deactivated.

No I mean like, disabling it per player.

Just wondering about the progress? :smile:

Sorry but I don’t understand what you mean.
I haven’t even started with development yet… :no_mouth:

By what you said, that’s disabling it for everyone.

For example there are 2 announcers:

  1. Tips
  2. News

So a player who has played on the server for 1 day already won’t need to keep seeing the tips, right? since they already know them. They can manually disable it for themselves by doing a command for example /bullhorn disable tips, but that’s only for one player who did the command, not everyone else. In contrast they can enabled it back with /bullhorn enable tips or something.

Well, that’s what I meant. The confusion came with ‘deactivatable in config’ I think. The admin will be able to disallow disabling certain sections, like I said ads. When the player tries to disable the ads, he won’t be able to do it.

Ah yes, that got me confused. With all the features discussed here, I think this will be the best broadcaster plugin once it’s done o.o

Is this still something you still plan to work on?

Yes, when I have time. There are currently several commissions and other existing plugins I am working on.