Templates & Ladder System

Templates & Ladder System

Templates define type, reason, duration, permission, scope, IP mode, silence, custom player message, actions and duplicate behavior. Steps inherit the base policy and may override these fields.

templates:
  Spam:
    type: MUTE
    reason: Spamming
    permission: wrongpunish.template.spam
    ladder-expire: 30d
    ladder:
      1: {duration: 30m}
      2: {duration: 6h}
      3: {type: BAN, duration: 7d, reason: Repeated Spam}
template-groups:
  Chat: [Spam]

Ladders must be consecutive, beginning at 1. Every successful execution counts, including one issued while an earlier step remains active. Offense numbers continue increasing after the final step; the final policy repeats. A reset occurs when the last use is older than ladder-expire. Removals and history pruning do not erase escalation records. Preview does not reserve a step. A GUI confirmation binds its displayed policy and offense; if another moderator advances it before confirmation, the stale action is rejected.

config.yml uses templates.overlap-mode: ADVANCE_LADDER by default. A repeated template creates a new record and supersedes applicable active records for that UUID/template ID, including a step changing punishment family. It stores superseded_by and superseded_at, retains historical records and starts the new duration at issuance: 7 days followed by 30 days produces a fresh 30-day punishment. REPLACE also uses the next policy's duration; EXTEND explicitly adds remaining time, subject to duration limits. Other overlapping templates and manual punishments still follow duplicate/strength rules. Scopes that do not overlap remain independently enforceable.

Give a template an explicit stable id when renaming its key; otherwise the ID is its lowercase key. Template execution history persists separately from punishment rows. /wrongpunish template <template> <player> and getTemplateStatus expose current/next offenses, latest punishment, next policy and reset deadline.

Template permissions: the actor needs wrongpunish.punish plus the selected policy's permission. When no explicit policy permission is configured, either wrongpunish.template.<name> or wrongpunish.punish.<name> is accepted; names in permission nodes are lowercase. A step's explicit permission replaces its inherited permission. Tab completion conservatively lists templates whose configured step permissions are all available, so it never offers an escalation the actor cannot apply. A partially authorized template can still be typed manually when its current step is permitted; execution checks that selected step. wrongpunish.punish.preview permits previews in addition to ordinary template permissions.

Template groups remain exposed through the catalog. The punishment GUI lists policies available for the target's actual next step; command tab completion remains conservative across configured steps.

Complete bundled example

# Keep template IDs when renaming templates
templates:
  Cheating:
    type: BAN
    reason: Unfair Advantage
    permission: wrongpunish.template.cheating
    silent: false
    ip: false
    scope: GLOBAL
    ladder-expire: 90d
    ladder:
      1:
        duration: 7d
      2:
        duration: 30d
      3:
        duration: permanent
    gui:
      material: DIAMOND_SWORD
      custom-model-data: 0
      name: '@gui.templates.cheating'
      lore: '@gui.template-lore'
  Spam:
    type: MUTE
    reason: Spamming
    permission: wrongpunish.template.spam
    ladder-expire: 30d
    ladder:
      1:
        duration: 30m
      2:
        duration: 6h
      3:
        duration: 1d
      4:
        duration: 7d
    gui:
      material: PAPER
      custom-model-data: 0
      name: '@gui.templates.spam'
      lore: '@gui.template-lore'
  Toxicity:
    type: MUTE
    reason: Toxicity
    permission: wrongpunish.template.toxicity
    ladder-expire: 30d
    ladder:
      1:
        duration: 1h
      2:
        duration: 12h
      3:
        type: BAN
        duration: 7d
        reason: Repeated Toxicity
    gui:
      material: WITHER_ROSE
      custom-model-data: 0
      name: '@gui.templates.toxicity'
      lore: '@gui.template-lore'
  Advertising:
    type: BAN
    reason: Advertising
    permission: wrongpunish.template.advertising
    duration: 30d
    gui:
      material: NAME_TAG
      custom-model-data: 0
      name: '@gui.templates.advertising'
      lore: '@gui.template-lore'
template-groups:
  Chat:
  - Spam
  - Toxicity
  - Advertising
  Gameplay:
  - Cheating
 

Overlap examples

A 7-day step followed by a 30-day step starts a fresh 30 days with ADVANCE_LADDER or REPLACE. EXTEND adds remaining time to the next duration and checks the combined duration limit. Independent non-overlapping scopes remain enforceable.