Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-27 08:30:09 +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.
Dieser Commit ist enthalten in:
Ursprung
ddbe8ef0fb
Commit
6553fc9ae9
@ -205,7 +205,7 @@ public class ItemPacketRewriter1_13 extends ItemRewriter<ClientboundPackets1_12_
|
|||||||
String old = channel;
|
String old = channel;
|
||||||
channel = getOldPluginChannelId(channel);
|
channel = getOldPluginChannelId(channel);
|
||||||
if (channel == null) {
|
if (channel == null) {
|
||||||
if (!Via.getConfig().isSuppressConversionWarnings()) {
|
if (Via.getManager().isDebug()) {
|
||||||
protocol.getLogger().warning("Ignoring serverbound plugin message with channel: " + old);
|
protocol.getLogger().warning("Ignoring serverbound plugin message with channel: " + old);
|
||||||
}
|
}
|
||||||
wrapper.cancel();
|
wrapper.cancel();
|
||||||
@ -217,7 +217,7 @@ public class ItemPacketRewriter1_13 extends ItemRewriter<ClientboundPackets1_12_
|
|||||||
String rewritten = getOldPluginChannelId(s);
|
String rewritten = getOldPluginChannelId(s);
|
||||||
if (rewritten != null) {
|
if (rewritten != null) {
|
||||||
rewrittenChannels.add(rewritten);
|
rewrittenChannels.add(rewritten);
|
||||||
} else if (!Via.getConfig().isSuppressConversionWarnings()) {
|
} else if (Via.getManager().isDebug()) {
|
||||||
protocol.getLogger().warning("Ignoring plugin channel in serverbound " + channel + ": " + s);
|
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 channel = wrapper.get(Types.STRING, 0);
|
||||||
final String namespacedChannel = Key.namespaced(channel);
|
final String namespacedChannel = Key.namespaced(channel);
|
||||||
if (channel.length() > 32) {
|
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);
|
getLogger().warning("Ignoring serverbound plugin channel, as it is longer than 32 characters: " + channel);
|
||||||
}
|
}
|
||||||
wrapper.cancel();
|
wrapper.cancel();
|
||||||
@ -181,7 +181,7 @@ public class Protocol1_15_2To1_16 extends AbstractProtocol<ClientboundPackets1_1
|
|||||||
List<String> checkedChannels = new ArrayList<>(channels.length);
|
List<String> checkedChannels = new ArrayList<>(channels.length);
|
||||||
for (String registeredChannel : channels) {
|
for (String registeredChannel : channels) {
|
||||||
if (registeredChannel.length() > 32) {
|
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");
|
getLogger().warning("Ignoring serverbound plugin channel register of '" + registeredChannel + "', as it is longer than 32 characters");
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren