-
Notifications
You must be signed in to change notification settings - Fork 2
Commands and Configuration
#Commands and Permissions:
/nbareload - Reloads the configuration
/nbasend - Sends an announcement from the nonannouncements section (see below)
nbaversion - Checks to see if you're up to date with the stable releases console only
nba.reload - Can Use /nbareload
nba.send - Can use/nbasend #Configuration
# Order, either sequential or random
order: sequential
If you want the messages to run in a sequential order as they are defined in the config, leave the setting at sequential. If you want the messages to shuffle before they are broadcasted, change it to random. If your messages are set to random they are only shuffled once (when the config is loaded or reloaded. This will mean that after they are initially read they will not change the order after.
servers:
global:
servers: null
announcements:
- message: "This is an announcement message"
type: text
delay: 60
permission: null
offset: 0
The above will work and have the announcement saying "This is an announcement message" every 60 seconds.
Simple enough, but what if you want to add color? To do so change
- message: "This is an announcement message" to - message: "&aThis is an announcement message"
Please note that you are able to change &a to any color code you want to use. You just need to prefix the code with &
What if I want to do multiple lines per announcement, you might wonder. This is possible to! You would need to change the type to "multitext" and add a /n between the lines
- message: 'Line 1 /nLine 2'
type: multitext
There is currently two ways to do this. First is to set the name to the server's name, like the first example.
The second is to set the servers: line to the server(s) you want to broadcast to as shown in the second example.
First:
lobby:
servers: null
announcements:
- message: This message is only shown in the "lobby" server
type: text
delay: 60
offset: 0
Second:
HungerGamesServers:
announcements:
- message: You are playing hunger games on play.your-server.com
type: text
delay: 60
offset: 30
servers:
- hunger1
- hunger2
- hunger3
As you can see from the second example, the servers: method is intended to be used more so for groups of servers than just one server, however, both do work!
You will need to change the offset: part of the sever block from the server blocks you don't want it to match. Please note that you have to do this per every section of servers you want to be different
global:
..
delay: 60
offset: 0
SomeServer:
...
delay: 60
offset: 30
You can even send messages with JSON formatting! You can check out Need help creating JSON messages? Check outh ttp://minecraftjson.com/for help on formatting them and I also suggest you use a JSON validator to double check your format being using it! Example basic JSON message that shows the message in a gold color:
- message: '{"text":"A simple json message","color":"gold"}'
type: json
Example usage that shows how to send a formatted link where all a user has to do is click on the text to open it.
- message: '{"text":"Click here to go to our website","color":"gold","clickEvent": {"action": "open_url","value": "http://www.example.com"}}'
type: json
You can do a bit more fancy things with is such as the following (which expands upon our last two examples)
- message: '[{"text":"&2[&4ServerName&2] "},{"text":"Check out our website ","color":"gold"},{"text":"by clicking here","color":"green","clickEvent":{"action":"open_url","value":"http://www.example.com"},"hoverEvent":{"action":"show_text","value":"&2Click here"}}]'
type: json
It's even possible to do multiple line JSON by using a JSON array:
- message: '[{"text":"A simple json message","color":"gold"},{"text":"A simple json message","color":"gold"}]'
type: multijson
Each message group has a "permission" value. You can set this to whatever you like and only the players with that permission will be able to receive the messages. Permissions are currently calculated by a single client (Bukkit/Spigot) server. As such I would suggest using your lobby or hub for this.
PLEASE NOTE: Messages will be delayed if there are no players online in the server set for permissions and the permissions aren't cached.
- Drop the NovaBungeeAnnouncer.jar file into your server of choice that will be asked for permissions.
- In the config file, set the
permissionServerto the name of the Spigot/Bukkit server that has the plugin installed. - Add permissions to the message groups
You can send broadcasts on a command with (as well as automated) too! You can send these with /nbasend <name> example usage in this case for the demo one is /nbasend demo.
nonannouncements:
demo:
message: '{"text":"Run this message by typing /nbasend demo","color":"gold"}'
permission: ''
type: json
donor:
message: '{"text":"Please welcome our newest donor <<1>>!","color":"gold"}'
permission: yourperm.donor
type: json
You can use arguments in the commands like /nbasend donor Fayettemat to send the above donor: message with the message of Please welcome our newest donor Fayettemat!.
To do so you would need to use /nbasend donor Fayettemat. Here's a break down of how it looks.
message: '{"text":"Please welcome our newest donor <<1>>!","color":"gold"}'
But how does that work? It takes anything between << and >> as the argument number in the above example we only have one argument so it's <<1>>, but what if we have two?
message: '{"text":"<<1>> Please welcome our newest donor <<2>>!","color":"gold"}'
You could use the following command to send the message then /nbasend donor DONORS: Fayettemat and it would show up as DONORS: Please welcome our newest donor Fayettemat!.