Staff++
Search…
Quick start
A small guide to help you configure the warnings system
On this page I guide you through an example configuration. The example used here is purely fictional, so don't go and copy paste the configuration. It is just to help you understand how you can set up the warnings system

Default configuration

When you clean install Staff++ the below configuration is installed>
1
# Requires "permissions.warn" permission.
2
warnings-module:
3
# Whether or not the plugin will use "/warn" features.
4
enabled: true
5
# The sound that is played to the player when warned.
6
# Set to "NONE" to disable.
7
sound: ORB_PICKUP
8
# Whether or not the player issued the warning will be visible in GUIs.
9
show-issuer: true
10
11
# Enables the ability to notify a user when he has warnings
12
# User will be notified the moment he comes online.
13
user-notifications:
14
enabled: true
15
# Enable this to show the message every time the user comes online.
16
# If Disabled the warnings will be marked as "read" and he will only be notified of new warnings
17
always-notify: false
18
19
actions: []
20
severity-levels:
21
- name: MINOR
22
score: 1
23
expiresAfter: 1 WEEK
24
- name: MAJOR
25
score: 3
26
expiresAfter: 1 MONTH
27
- name: CRITICAL
28
score: 5
29
# Define thresholds for the warning system. Whenever the player reaches a threshold the actions are triggered
30
thresholds:
31
- score: 6
32
actions:
33
- command: "ban %player% &4Warning threshold has been met"
34
35
appeals:
36
enabled: true
37
resolve-reason-enabled: false
38
fixed-reason: false
39
reasons:
40
- ''
Copied!
However this configuration is only an example and you most probably want to change this to fit your needs.
Start by changing the severity levels inside the configuration file. You want to choose levels that you find logical for your server. They describe the different types of warnings you might have. For example I will change mine to something like this:
1
severity-levels:
2
- name: CUSSING
3
score: 1
4
expiresAfter: 1 WEEK
5
reason: Player us ed curse words
6
- name: ADVERTISEMENT
7
score: 2
8
expiresAfter: 4 DAY
9
- name: STEALING
10
expiresAfter: 1 MONTH
11
score: 4
12
- name: GRIEFING
13
expiresAfter: 1 MONTH
14
score: 5
15
- name: MURDER
16
expiresAfter: 1 MONTH
17
score: 6
18
- name: EXTREME GRIEFING
19
expiresAfter: 3 MONTH
20
score: 7
21
- name: HACKING
22
score: 7
23
- name: BULLYING
24
score: 9
Copied!
The above is an example of how you could configure severity levels. The score is used for threshold calculations and indicates how severe the warning is. expiresAfter defines when a warning should be expired, meaning no longer used for threshold calculations, leave this out to never expire this type of warning. We can specify a default reason which will be linked to the warning when issued. Every warning needs a severity level. When you issue a warning you have to choose one of the above levels.

Actions

You will notice the actions array is empty by default. Actions aka "punishments" define what commands should be executed when a player receives a warning. Actions can be triggered for every warning or for a specific severity level by using the filter. To illustrate I will add following punishments: (This configuration uses fictive commands)
1
actions:
2
# For every warning a player receives, deduct $200 from his balance
3
- command: eco take %target% 200
4
rollback-command:
5
command: eco give %target% 200
6
# Jail a player for 30 minutes for stealing, griefing or murder
7
- command: jail %target% 30
8
filters: severity=STEALING,GRIEFING,MURDER
9
rollback-command:
10
command: unjail %target%
11
# Ban player for hacking
12
- command: ban %target% Hacking
13
filters: severity=HACKING
14
rollback-command:
15
command: unban %target% Warning rolled back
16
# Ban player for bullying
17
- command: ban %player% Bullying
18
filters: severity=BULLYING
19
rollback-command:
20
command: unban %player% Warning rolled back
Copied!
Notice I always define a rollback command. This command gets executed should the warning get appealed or deleted. This is a way to automatically reverse punishments.
The last thing you can configure are thresholds. Thresholds are punishments that are given when a players gets too many warnings. Warnings score will be counted unless the warning is expired or the warning has been successfully appealed
1
thresholds:
2
- score: 16
3
actions:
4
- command: "ban %player% &4Too many warnings received"
Copied!
In the above configuration I define that if a player received a total warning score of 16 he will get automatically banned. You can define multiple thresholds and punishments.
This is the basic setup of the warning configuration. You can find more information on every topic discussed here on the other documentation pages.
Last modified 4mo ago