Skip to content

Command logger

Cyrusbye720 edited this page Jun 6, 2026 · 3 revisions

Command logger

Watches for specific commands and posts them to a staff Discord channel with a colour-coded severity. Use this to keep an audit trail of sensitive commands.

Configuration

command-logger:
  enabled: true
  channel: "123456789012345678"
  watched-commands:
    - "ban"
    - "kick"
    - "mute"
    - "whitelist"
    - "gamemode"
  critical-commands:
    - "op"
    - "deop"
    - "stop"
    - "restart"

The match is on the base command (the first token of the message), case-insensitive. So /Ban player matches ban.

Severity

  • WATCHED (yellow) — command is in watched-commands.
  • CRITICAL (red) — command is in critical-commands.

Critical events always log; watched events log only if the command is also in the watched list.

Note

The command logger hooks PlayerCommandPreprocessEvent at MONITOR priority. Commands cancelled by other plugins are still logged.


ZDiscord v1.1.0 · Home · Issues · Source

Clone this wiki locally