From 423d659d0e9313ac8b525d3bdc13353d169b4d16 Mon Sep 17 00:00:00 2001 From: Jeroen Bollen Date: Mon, 11 Apr 2022 17:01:58 +0200 Subject: [PATCH] Stop spamming the logs No need to spam the logs on success. --- .../java/net/chatsounds/mixin/ChatsoundsMixin.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/main/java/net/chatsounds/mixin/ChatsoundsMixin.java b/src/main/java/net/chatsounds/mixin/ChatsoundsMixin.java index fa98e92..5a057d2 100644 --- a/src/main/java/net/chatsounds/mixin/ChatsoundsMixin.java +++ b/src/main/java/net/chatsounds/mixin/ChatsoundsMixin.java @@ -27,39 +27,32 @@ private void addMessage(Text message, int messageId, int timestamp, boolean refr if (message instanceof TranslatableText) { String key = ((TranslatableText)message).getKey(); - System.out.println(String.format("Translation key: %s", key)); if (config.join.enabled && key.contains("multiplayer.player.joined")) { - System.out.println(String.format("Chatsounds playing join sound.")); client.getSoundManager().play(config.join.getChatSound(x, y, z)); } else if (config.leave.enabled && key.contains("multiplayer.player.left")) { - System.out.println(String.format("Chatsounds playing leave sound.")); client.getSoundManager().play(config.leave.getChatSound(x, y, z)); } else if (config.death.enabled && key.contains("death.")) { - System.out.println(String.format("Chatsounds playing death sound.")); client.getSoundManager().play(config.death.getChatSound(x, y, z)); } else if (config.pm.enabled && key.contains("commands.message.display.")) { - System.out.println(String.format("Chatsounds playing pm sound.")); client.getSoundManager().play(config.pm.getChatSound(x, y, z)); } else if (config.advancement.enabled && key.contains("chat.type.advancement.")) { - System.out.println(String.format("Chatsounds playing advancement sound.")); client.getSoundManager().play(config.advancement.getChatSound(x, y, z)); } else if (config.message.enabled && key.contains("chat.type.")) { - System.out.println(String.format("Chatsounds playing message sound.")); client.getSoundManager().play(config.message.getChatSound(x, y, z)); } else { - System.out.println(String.format("Chatsounds failed to recognize translation key: %s", key)); + System.out.println(String.format("Chatsounds failed to find translation key: %s", key)); client.getSoundManager().play(config.message.getChatSound(x, y, z)); } } else { - System.out.println("Chatsounds failed to find translation key."); + // Fall back to the message sound if (config.message.enabled) client.getSoundManager().play(config.message.getChatSound(x, y, z)); } }