Remove n-word filter
I would not say it, but if someone wants to say it with my mod, I do not want to prevent them...
This commit is contained in:
parent
a1e0970a4b
commit
88e196df11
1 changed files with 0 additions and 13 deletions
|
@ -22,8 +22,6 @@ public class CustomChat {
|
|||
|
||||
public static final CustomChat INSTANCE = new CustomChat(MinecraftClient.getInstance());
|
||||
|
||||
public static final Pattern RACIST_PATTERN = Pattern.compile("nigga|nigger|i hate black", Pattern.CASE_INSENSITIVE);
|
||||
|
||||
public boolean enabled = true;
|
||||
|
||||
public String format;
|
||||
|
@ -44,17 +42,6 @@ public class CustomChat {
|
|||
public void chat (String message) {
|
||||
final ClientPlayerEntity player = client.player;
|
||||
|
||||
try {
|
||||
final Matcher racistMatcher = RACIST_PATTERN.matcher(message);
|
||||
if (racistMatcher.matches()) {
|
||||
player.sendMessage(Text.literal("racism bad"));
|
||||
|
||||
return;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
if (!enabled || !player.hasPermissionLevel(2) || !player.isCreative()) {
|
||||
Chat.sendChatMessage(message, true);
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue