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:
7cc5c4f330d47060 2024-09-04 21:11:35 -04:00
parent a1e0970a4b
commit 88e196df11
Signed by: 7cc5c4f330d47060
SSH key fingerprint: SHA256:e+4tcZut1nBpe10PqjaO+Rvie0Q7W4qIvFzcUw+7riA

View file

@ -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;