diff --git a/src/main/java/com/botdetector/BotDetectorPlugin.java b/src/main/java/com/botdetector/BotDetectorPlugin.java index a1a4bec8..4dbe6b59 100644 --- a/src/main/java/com/botdetector/BotDetectorPlugin.java +++ b/src/main/java/com/botdetector/BotDetectorPlugin.java @@ -643,11 +643,13 @@ private void processPlayer(Player player) return; } + String playerName = normalizePlayerName(player.getName()); + if (player == client.getLocalPlayer()) { - if (loggedPlayerName == null || !loggedPlayerName.equals(player.getName())) + if (loggedPlayerName == null || !loggedPlayerName.equalsIgnoreCase(playerName)) { - loggedPlayerName = player.getName(); + loggedPlayerName = playerName; updateTimeToAutoSend(); refreshPlayerStats(true); } @@ -660,7 +662,6 @@ private void processPlayer(Player player) return; } - String playerName = normalizePlayerName(player.getName()); CaseInsensitiveString wrappedName = wrap(playerName); if (playerName == null) { @@ -737,7 +738,7 @@ private void verifyDiscord(ChatMessage chatMessage, String message) String author; if (chatMessage.getType().equals(ChatMessageType.PRIVATECHATOUT)) { - author = normalizePlayerName(loggedPlayerName); + author = loggedPlayerName; } else {