Config tutorial
>> Back to main page <<
Let's start with simple message:
messages: 'my first message': time: 30 message: - 'Hello &lworld!'
Hover event
To add a hover event, simply add new line to hover event:
messages: 'my first message': time: 30 message: - 'Hello ' - '&l&bworld!' hover: - '' - '&lHey!'
As you can see, first hover message belongs to first phrase, second to second etc., so if you hover over 'Hello ', nothing happens, but if you hover over 'world!', the 'Hey!' message will be shown.
Click event
You can use one of these click events:
- run_command - runs command.
- suggest_command - suggests command, i.e. changes the chat input value.
- open_url - opens url.
messages: 'my first message': time: 30 message: - 'Hello ' - '&lworld!' hover: - '' - '&lHey!' click: - 'suggest_command:/me What a great day!'
Similar to hover event, first click message belongs to first phrase, second to second etc., so if you click on 'Hello ', the value in your chat input will change, but if you click on 'world!', nothing will happen at all.
More messages
Don't worry, with SuperBroadcast you can add any number of messages as you like!
messages: 'my first message': time: 10 message: - 'Hello &lworld!' 'second!': time: 60 message: - 'Yay, &aI''m &osecond&r! &kwow' 'check website ': time: 30 message: - '&8[&9Tip&8] ' - '&7Click me to open our website!' click: - '' - 'open_url:http://dev.bukkit.org/bukkit-plugins/superbroadcast/'
The image below shows all three messages (I've been waiting for 10+60+30=100 seconds):
Problem with single quotes
To add a single quote to your message simply use two single quotes instead! :)
New line
Use \n to add a new line.
Selectors
There are 4 selectors available since version 1.0.2, which you can use in your messages, titles and subtitles:
- %player% - player name
- %display% - player display name (custom, modified name)
- %time% - current time in format HH:mm
- %time2% - current time in format HH:mm:ss
Titles and subtitles
You can also send titles and subtitles to player since 1.0.2! To add a title or subtitle, use title and subtitle configuration sections:
messages: 'something': time: 30 title: - '&6My title!' subtitle: - '&oand subtitle!'
Comments