Staff++
<= 1.16.56
<= 1.16.56
  • Staff++
  • General information
    • Quick start
    • Reload Configuration
    • Multi Server Setup
    • General Configuration
  • Permissions & Commands
    • Commands
    • Permissions
  • Features
    • Alerts
      • X-Ray
    • Alt account detection
    • Authentication
    • Banning
      • Fixed Ban Reason
      • Templates
    • Broadcasting
    • Chat module
    • Chest/Inventory Interaction
    • Examine players
    • Infractions
    • Investigate
    • Protection
    • Reporting
      • Finding reports
      • Custom report types
    • Staff Chat
    • Staff Mode
      • Luckperms integration
      • Custom GUI
      • Staff Modules
      • Custom Staff Modules
    • Teleporting
    • Warnings
      • Quick start
      • Severity levels
      • Thresholds
      • Actions (punishments)
      • Appealing
      • Warning workflow
  • Integrations
    • Discord Integration
      • Staff Chat
      • Template Packs
      • Customize Discord Templates
    • Trello Integration
  • Migration guides
    • Staff+ migration guide
    • Migrating to >=V1.16.43
    • Upgrading Discord Integration to 1.16.51
  • Developers
    • API guide
Powered by GitBook
On this page

Was this helpful?

  1. Features
  2. Warnings

Actions (punishments)

PreviousThresholdsNextAppealing

Last updated 4 years ago

Was this helpful?

We can define actions inside the warnings-module. Actions will be executed whenever a warning is issued. Every action must at least consist of a command and . The command will get executed when the warning is issued.

Besides the general command, a rollback-command can be specified. The rollback command gets executed whenever a warning is deleted or has been successfully .

Filters can be used to further specify when a command should be run. Currently only a filter is available. If no filters are applied the command will get executed with every warning issued. Example configuration:

warnings-module:
  actions:
    - command: 'eco take %player% 2000'
      rollback-command: 'eco give %player% 2000'
      run-strategy: ALWAYS
      filters: 'severity=MINOR,MAJOR'
    - command: 'eco take %player% 5000'
      rollback-command: 'eco give %player% 5000'
      run-strategy: ALWAYS
      filters: 'severity=CRITICAL'
    - command: 'freeze enabled %player%'
      rollback-command: 'freeze disabled %player%'
      run-strategy: DELAY
      filters: 'severity=CRITICAL'

In the above example configuration the following will happen:

If a MINOR or MAJOR warning is issued. - The player will be deducted $2000 from his balance. If a CRITICAL warning is issued. - The player will be deducted $5000 from his balance. - The player will get frozen if he is online, or the next time he comes online. If the warning gets rollbacked the player will get automatically reimbursed.

It's important to not that actions get linked to the warning the moment the warning is created. Changing the action configuration will not impact existing warnings.

Run strategy

As you can see in the above configuration, we can define a run strategy for each command. This is useful when we want to only execute the command in a certain situation.

Possible strategies:

  • ALWAYS Run the command regardless if the player is on- or offline. This will always try to run the command immediately

  • ONLINE Run the command only if the player is online. Should the player be offline when the threshold is reached the configured command wont be executed.

  • DELAY If the player is online, run the command immediately. If the player is offline, delay the command until his next login.

appealed
run-strategy
severity