promotional bannermobile promotional banner

Custom Regex Chat Tools

Censor without players noticing!

Custom Regex, Tested for: 1.8-1.12.2

This doesn't mean it won't work for other versions!

 

Permissions

zerodasho.customregex.generic - Allows use of /cregex (help/info)

zerodasho.customregex.reload   - Allows use of /cregex reload

 

Basics

Custom Regex allows you to use regular expressions on your server. If you have no idea what regular expressions are, and how to use them, I highly suggest reading up on them. If you don't feel like reading up on them, you can still use this plugin.

 

To censor a word, plug this into the config.yml

replace:
    censor_crap:
        regex: crap
        replacement: goodness
        must_match: false
        silent_replace: true

This will replace any chat message that contains the regex in it - in this case, crap - with the replacement: goodness. "silent_replace: true" makes it so that the player that sent the message with "crap" in it doesn't notice that his message has been censored!

Config

replace:
    #Name of regular expression
    howdy2hello:
        #Regular expression - if a chat message matches the regex, it will be replaced by the replacement message
        regex: (?i)([Hh])owdy (.*)!
        #Replacement message
        replacement: $1ello $2!
        #Player must have this permission for message to be replaced
        permission: zerodasho.customregex.generic
        #If true, the message changes for everyone except the sender. Useful for censor.
        silent_replace: true
        #Entire message must match the regex, not just a segment
        must_match: false
        # EXAMPLE:    
        #[Donator] Guy: Howdy Guy2!
        # Becomes:
        #[Donator] Guy: Hello Guy2!
    
commands:
    #Name of regular expression
    broadcast: 
        #Regular expression - if a chat message matches this regex, the following commands are run
        regex: (?i)bc (.*)
        #Player must have this permission for commands to execute
        permission: zerodasho.customregex.reload
        #If true, the chat message is canceled.
        cancel_chat: true
        commands:
            #Command to run
          - command: say $1
            is_player: false
        # EXAMPLE:
        #[Donator] Guy: bc Hello everyone!
        # Runs command:
        #[Server] Hello everyone!

The Custom Regex Chat Tools Team

profile avatar
  • 6
    Projects
  • 5.4K
    Downloads

More from zer0dashomlView all

  • mc-sabotage project image

    mc-sabotage

    • 374
    • Bukkit Plugins

    A classic 'trouble in terrorist town' plugin

    • 374
    • June 26, 2022
    • Bukkit Plugins
    • +1
  • CorpseImmortal project image

    CorpseImmortal

    • 629
    • Bukkit Plugins

    Spawn corpses

    • 629
    • June 25, 2022
    • Bukkit Plugins
    • +2
  • Config project image

    Config

    • 328
    • Bukkit Plugins

    Plugin for creating configuration files.

    • 328
    • June 25, 2022
    • Bukkit Plugins
  • crackshot-delay project image

    crackshot-delay

    • 313
    • Bukkit Plugins

    CrackShot add-on for weapon delay

    • 313
    • August 12, 2020
    • Bukkit Plugins
    • +4
  • mc-sabotage project image

    mc-sabotage

    • 374
    • Bukkit Plugins

    A classic 'trouble in terrorist town' plugin

    • 374
    • June 26, 2022
    • Bukkit Plugins
    • +1
  • CorpseImmortal project image

    CorpseImmortal

    • 629
    • Bukkit Plugins

    Spawn corpses

    • 629
    • June 25, 2022
    • Bukkit Plugins
    • +2
  • Config project image

    Config

    • 328
    • Bukkit Plugins

    Plugin for creating configuration files.

    • 328
    • June 25, 2022
    • Bukkit Plugins
  • crackshot-delay project image

    crackshot-delay

    • 313
    • Bukkit Plugins

    CrackShot add-on for weapon delay

    • 313
    • August 12, 2020
    • Bukkit Plugins
    • +4