mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-21 17:45:36 +01:00
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.
This commit is contained in:
parent
ddbe8ef0fb
commit
6553fc9ae9
@ -205,7 +205,7 @@ public class ItemPacketRewriter1_13 extends ItemRewriter<ClientboundPackets1_12_
|
||||
String old = channel;
|
||||
channel = getOldPluginChannelId(channel);
|
||||
if (channel == null) {
|
||||
if (!Via.getConfig().isSuppressConversionWarnings()) {
|
||||
if (Via.getManager().isDebug()) {
|
||||
protocol.getLogger().warning("Ignoring serverbound plugin message with channel: " + old);
|
||||
}
|
||||
wrapper.cancel();
|
||||
@ -217,7 +217,7 @@ public class ItemPacketRewriter1_13 extends ItemRewriter<ClientboundPackets1_12_
|
||||
String rewritten = getOldPluginChannelId(s);
|
||||
if (rewritten != null) {
|
||||
rewrittenChannels.add(rewritten);
|
||||
} else if (!Via.getConfig().isSuppressConversionWarnings()) {
|
||||
} else if (Via.getManager().isDebug()) {
|
||||
protocol.getLogger().warning("Ignoring plugin channel in serverbound " + channel + ": " + s);
|
||||
}
|
||||
}
|
||||
|
@ -172,7 +172,7 @@ public class Protocol1_15_2To1_16 extends AbstractProtocol<ClientboundPackets1_1
|
||||
final String channel = wrapper.get(Types.STRING, 0);
|
||||
final String namespacedChannel = Key.namespaced(channel);
|
||||
if (channel.length() > 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<ClientboundPackets1_1
|
||||
List<String> 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;
|
||||
|
Loading…
Reference in New Issue
Block a user