Home›Java›Mods›AntiSwear Pro
AntiSwear Pro
ModsJava

AntiSwear Pro

Minecraft Java mod. Downloads from the MC Java Mods app on Android.

⬇ Download on Spigot
Don't write hundreds of synonyms or complex regexps, when you can write just words.

Under MIT license, opensource.

Config
Default config for Bukkit server contains English, Polish, Czech and Slovak swears. Just download & enjoy.

BetterAntiSwear got inteligent filters to detect swears even if they do not match exactly. That means, you don't have to write hunders of synonyms or write complex regexes to avoid swears in your chat - you just tell plugin blacklisted words, few additional whitelisted (like badass) and start your server.

BetterAntiSwear was originally made as Bukkit plugin, but is fully compatible with plain Java, and removing Bukkit support is really easy - remove AntiSwearPlugin.java and unimport ChatColor and ConfigurationSection from AntiSwear.java.

For example, if you got config with blacklisted duck and noob (as d*ck and n**b), and whitelisted ducks, BetterAntiSwear will do the following:

Code (Text):

duck. -> d*ck.
!D.u.C.K! -> !d*ck!
DUUUUCK -> d*ck
DuCKs! -> DuCKs!
DuCkS -> DuCkS
Duucks -> d*cks

noob -> n**b
nôb?? -> n**b??
n0b! -> n**b!
Ň.ôB -> n**b
 

Permissions
Commands
/bas
API
Code (Java):

    AntiSwear as = AntiSwear. getLast ( ) ;
   
      //If antiswear instance was found, use it
      //Oterwise create new
      if (as == null ) {
       as = AntiSwear. getNew ( ) ;
       AntiSwear. setLast (as ) ;
     
        //Add blacklisted words
       as. addBlacklist ( "idiot", "idi*t" ) ;
       as. addBlacklist ( "noob", "n**b" ) ;
     
        //Add blacklisted words from map
       Map < String,String > bl = new HashMap < String,String > ( ) ;
       bl. put ( "duck", "d**k" ) ;
       bl. put ( "ass", "as*" ) ;
       as. addBlacklist (bl ) ;
     
        //Add whitelisted words
        //Space will match punctation, any space and start/end of text
        //  see AntiSwear.WHITELIST_SPACE_EQUALS
       as. addWhitelist ( " ducks ", " badass " ) ;
      }
   
   
      //string to check
      String message = "My little pony, badass duck need ducks! A$shole, Nub, n00bs!" ;
   
      //process string
      System. out. print ( "Processing string: " ) ;
      System. out. println (message ) ;
      String nevMessage = as. processString (message ) ;
   
      if (nevMessage == null ) {
        //If processString returned null, given message does not
        //contains swears!
        System. out. println ( "Not swears were found!" ) ;
      } else {
        //Otherwise swears were found and removed
        System. out. println ( "Swears were found! New message is:" ) ;
        System. out. println (nevMessage ) ;
     
        //If using our settings, swears will be found
        //and we will get new message:
        //My little pony, badass d**k need ducks! as*hole, n**b, n**bs!
      }

 
Source code

Commands

Plugin details

Read from the plugin's own plugin.yml.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

AntiSwear Pro is a free Minecraft Java mod. Downloaded 575 times (via Spigot). Download it and open it directly in the game.

Explore more