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>

# Requires "permissions.warn" permission.
warnings-module:
  # Whether or not the plugin will use "/warn" features.
  enabled: true
  # The sound that is played to the player when warned.
  # Set to "NONE" to disable.
  sound: ORB_PICKUP
  # Whether or not the player issued the warning will be visible in GUIs.
  show-issuer: true

  # Enables the ability to notify a user when he has warnings
  # User will be notified the moment he comes online.
  user-notifications:
      enabled: true
      # Enable this to show the message every time the user comes online.
      # If Disabled the warnings will be marked as "read" and he will only be notified of new warnings
      always-notify: false

  actions: []
  severity-levels:
    - name: MINOR
      score: 1
      expiresAfter: 1 WEEK
    - name: MAJOR
      score: 3
      expiresAfter: 1 MONTH
    - name: CRITICAL
      score: 5
  # Define thresholds for the warning system. Whenever the player reaches a threshold the actions are triggered
  thresholds:
    - score: 6
      actions:
        - command: "ban %player% &4Warning threshold has been met"
          run-strategy: ALWAYS
  appeals:
      enabled: true
      resolve-reason-enabled: false
      fixed-reason: false
      reasons:
          - ''

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:

severity-levels:
  - name: CUSSING
    score: 1
    expiresAfter: 1 WEEK
    reason: Player us ed curse words 
  - name: ADVERTISEMENT
    score: 2
    expiresAfter: 4 DAY
  - name: STEALING
    expiresAfter: 1 MONTH
    score: 4
  - name: GRIEFING
    expiresAfter: 1 MONTH
    score: 5
  - name: MURDER
    expiresAfter: 1 MONTH
    score: 6
  - name: EXTREME GRIEFING
    expiresAfter: 3 MONTH
    score: 7
  - name: HACKING
    score: 7
  - name: BULLYING
    score: 9

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.

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)

actions:
  # For every warning a player receives, deduct $200 from his balance 
  - command: eco take %player% 200
    rollback-command: eco give %player% 200
    run-strategy: ALWAYS
  # Jail a player for 30 minutes for stealing, griefing or murder
  - command: jail %player% 30
    rollback-command: unjail %player%
    run-strategy: ALWAYS
    filters: severity=STEALING,GRIEFING,MURDER
  # Ban player for hacking  
  - command: ban %player% Hacking
    rollback-command: unban %player% Warning rolled back
    run-strategy: ALWAYS
    filters: severity=HACKING
  # Ban player for bullying
  - command: ban %player% Bullying
    rollback-command: unban %player% Warning rolled back
    run-strategy: ALWAYS
    filters: severity=BULLYING

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

thresholds:
  - score: 16
    actions:
      - command: "ban %player% &4Too many warnings received"
        run-strategy: ALWAYS

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 updated