In my opinion censoring should be done clientside with the option to turn it on or off. Therefor it should be applied to OTHER player chat rather than your own(using I think it's onRemotePlayerChats() {}). This is because it discourages swear evasion. Those who feel comfortable with cursing can see/do it without feeling censored, so no need to evade it. Thus those who don't like cursing can have other chat censored and since they don't need to evade it remains far more accurate.
Also it'd probably be better to just load them from the serveroptions rather than a file.