Staff++
Search…
Templates
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.

Setup

Inside the Staff++ plugin directory 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:
default.txt
130B
Text
bans/default.txt
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.

placeholders

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

Configuration

1
ban-module:
2
enabled: true
3
permban-template: default
4
tempban-template: default
Copied!
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.

Overwriting the default template

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.
Last modified 5mo ago