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?
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 Text
s.
So you can have several message cycles running concurrently (e.g. one for game tips, one for advertisements, etc.)
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
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?
Sorry but I donât understand what you mean.
I havenât even started with development yetâŚ
By what you said, thatâs disabling it for everyone.
For example there are 2 announcers:
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.