From 6553fc9ae9018eebcc26ce2227ef6336455b9247 Mon Sep 17 00:00:00 2001 From: EnZaXD Date: Sun, 10 Nov 2024 21:45:06 +0100 Subject: [PATCH] Only print invalid custom payload channel warnings in debug mode (#4257) We previously had people complaining about this being an error and not understanding what it means + servers can't do anything about these errors anyway. --- .../v1_12_2to1_13/rewriter/ItemPacketRewriter1_13.java | 4 ++-- .../protocols/v1_15_2to1_16/Protocol1_15_2To1_16.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/v1_12_2to1_13/rewriter/ItemPacketRewriter1_13.java b/common/src/main/java/com/viaversion/viaversion/protocols/v1_12_2to1_13/rewriter/ItemPacketRewriter1_13.java index 26119ee83..3c6e6be07 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/v1_12_2to1_13/rewriter/ItemPacketRewriter1_13.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/v1_12_2to1_13/rewriter/ItemPacketRewriter1_13.java @@ -205,7 +205,7 @@ public class ItemPacketRewriter1_13 extends ItemRewriter 32) { - if (!Via.getConfig().isSuppressConversionWarnings()) { + if (Via.getManager().isDebug()) { getLogger().warning("Ignoring serverbound plugin channel, as it is longer than 32 characters: " + channel); } wrapper.cancel(); @@ -181,7 +181,7 @@ public class Protocol1_15_2To1_16 extends AbstractProtocol checkedChannels = new ArrayList<>(channels.length); for (String registeredChannel : channels) { if (registeredChannel.length() > 32) { - if (!Via.getConfig().isSuppressConversionWarnings()) { + if (Via.getManager().isDebug()) { getLogger().warning("Ignoring serverbound plugin channel register of '" + registeredChannel + "', as it is longer than 32 characters"); } continue;