๐ŸคฌSwear Filter

The swear filter detects and blocks profanity in chat messages. It includes automatic evasion detection for leet speak, repeated characters, and separator characters. Configuration is in moderation/moderation.yml.

Configuration

swear-filter:
  enabled: true

  # Action: CANCEL, CENSOR, or WARN
  action: CENSOR

  # Character used for censoring
  censor-char: "*"

  # Also filter private messages
  filter-private-messages: true

  # Blocked words list
  blocked-words:
    - "word1"
    - "word2"
    # ... add your own words

  # Regex patterns for complex filtering
  blocked-patterns: []

  # Bypass permission
  bypass-permission: "lpcpro.bypass.filter"

How It Works

Word Detection

For every word in the blocked-words list, the filter automatically detects:

  • Exact matches โ€” word

  • Leet speak โ€” w0rd, w@rd, w()rd

  • Repeated characters โ€” wooord, worrrd

  • Separator characters โ€” w-o-r-d, w.o.r.d, w_o_r_d

  • Combinations โ€” w0.0.r-d

You only need to add the base word โ€” evasion detection is automatic.

Regex Patterns

For more complex filtering needs that can't be expressed as single words, use blocked-patterns:

circle-info

The word list already handles most evasion techniques. Only use regex patterns for rules that can't be expressed as individual words.

Actions

Action
Description

CANCEL

Block the message entirely

CENSOR

Replace matched words with the censor character (default)

WARN

Allow the message but warn the player

Censoring Example

With censor-char: "*" and the word "test" blocked:

  • Input: This is a test message

  • Output: This is a **** message

Private Messages

Set filter-private-messages: true to also filter /msg content through the swear filter.

Bypass

Permission: lpcpro.bypass.filter (default: op)

Last updated