From c113f3486237e7f2c6983efe49570c78f5342909 Mon Sep 17 00:00:00 2001 From: TheJeterLP Date: Wed, 17 Jan 2024 17:17:49 +0100 Subject: [PATCH] Fix wordblocker being case-sensitive --- pom.xml | 2 +- src/main/java/de/jeter/chatex/ChatListener.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 7cc7913..7ced301 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ ChatEx 2024 - 3.2.1 + 3.2.2 ChatManagement plugin for Bukkit https://www.spigotmc.org/resources/chatex-continued.71041/ diff --git a/src/main/java/de/jeter/chatex/ChatListener.java b/src/main/java/de/jeter/chatex/ChatListener.java index 2160225..279c689 100644 --- a/src/main/java/de/jeter/chatex/ChatListener.java +++ b/src/main/java/de/jeter/chatex/ChatListener.java @@ -130,7 +130,7 @@ private void executeChatEvent(AsyncPlayerChatEvent event) { LogHelper.debug("Player did not activate the AdBlocker. Continuing..."); for(String block : Config.BLOCKED_WORDS.getStringList()) { - if(chatMessage.contains(block)) { + if(chatMessage.toLowerCase().contains(block.toLowerCase())) { LogHelper.debug("Player activated wordblocker! ChatMessage: " + chatMessage + " contains blockedWord: " + block); String message = Locales.MESSAGES_BLOCKED.getString(null); MessageContainsBlockedWordEvent messageContainsBlockedWordEvent = new MessageContainsBlockedWordEvent(player, chatMessage, message);