Page cover

⚠️Warn

circle-info

The Warn system is an escalating punishment mechanic. Instead of a single action, warnings accumulate to trigger automatic punishments (like Mutes or Bans) based on configuration levels.

How it Works

When a player is warned, their Warn Level increases. Crown checks warn.yml to see if a specific level (e.g., 3 warnings) has a configured action (e.g., Apply Softban).

Usage

Command
Permission
Description

/warn <player> [reason]

crown.punish.warn

Issues a warning.

/unwarn <player>

crown.unpunish.warn

Removes the most recent active warning.

Expiration Modes

Defined in warn.yml under expiration-mode:

  1. unique: Each warning has its own timer. When a warning expires, the level drops by 1.

  2. incremental: A new warning pauses the timers of previous warnings. The previous warning only resumes ticking down after the newest one expires.

Level Configuration (warn.yml)

This is where you define the consequences of warnings.

levels:
  1:
    expiration: '1m'
    on-warn-actions:
      - 'MESSAGE_TARGET:&cThis is your first warning.'
  2:
    expiration: '1h'
    # Hooks can apply other punishments
    on-warn-actions:
      - 'APPLY_MUTE:1h:Reached Warning Level 2'
      - 'MESSAGE_TARGET:&cYou have been muted for accumulating warnings.'
  3:
    expiration: '24h'
    on-warn-actions:
      - 'APPLY_BAN:1d:Reached Warning Level 3'

Last updated