Templates
Last updated
Last updated
You can use txt files to describe the logout message a player will see when he gets banned. By default this entire functionality is disabled. To enable templates do the following.
Inside the data directory of the Staff++ plugin create a bans directory if it does not already exists. Inside this bans directory you can create the template files. A template file is a simple text file containing the message that will displayed to the user on ban. Example file:
I named the above file default.txt. The file name without extension will be used as template name.
This will result in the following:
My example is not that pretty but it illustrates the usage.
Inside the template the following placeholders can be used
placeholder | description |
%target% | The banned player's username |
%issuer% | The staff members username |
%reason% | The ban reason |
%duration% | Human readable duration. Only available with tempbans |
Inside the config.yml file you can fill in a default template for permanent and temporary ban. Or leave it empty to fall back on the message defined in the lang file.
If staff members have the permission: staff.staffplus.ban-template-overwrite
they can use an extra parameter "-template=" when banning a player.
Example:
/ban thisplayer -template=other I ban you!
This will overwrite the default configured template and try to find and use a template with the given name. If the template does not exist an error will be shown.