From f4d66597607422b554d9c78bd709a7e30b74f05f Mon Sep 17 00:00:00 2001 From: EnZaXD Date: Fri, 28 Jun 2024 13:44:31 +0200 Subject: [PATCH] Only print broken json in component type when debug mode is enabled (#3990) --- .../viaversion/viaversion/api/type/types/ComponentType.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/src/main/java/com/viaversion/viaversion/api/type/types/ComponentType.java b/api/src/main/java/com/viaversion/viaversion/api/type/types/ComponentType.java index 0950bde3c..bb64df2d0 100644 --- a/api/src/main/java/com/viaversion/viaversion/api/type/types/ComponentType.java +++ b/api/src/main/java/com/viaversion/viaversion/api/type/types/ComponentType.java @@ -44,7 +44,9 @@ public class ComponentType extends Type { try { return JsonParser.parseString(s); } catch (JsonSyntaxException e) { - Via.getPlatform().getLogger().severe("Error when trying to parse json: " + s); + if (Via.getManager().isDebug()) { + Via.getPlatform().getLogger().severe("Error when trying to parse json: " + s); + } throw e; } }