From c021eb2020c6baf2c7c9fb116323e285cb2d185c Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Tue, 4 Sep 2018 00:50:24 -0400 Subject: [PATCH] Don't output ProtocolVersion toString() in decode errors This information is extremely technical in nature and the data is already available for developer use by examining StateRegistry. --- .../proxy/protocol/netty/MinecraftDecoder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/netty/MinecraftDecoder.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/netty/MinecraftDecoder.java index 4e05b3647..07ddb287f 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/netty/MinecraftDecoder.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/netty/MinecraftDecoder.java @@ -38,11 +38,11 @@ public class MinecraftDecoder extends MessageToMessageDecoder { packet.decode(msg, direction, protocolVersion.id); } catch (Exception e) { throw new CorruptedFrameException("Error decoding " + packet.getClass() + " Direction " + direction - + " Protocol " + protocolVersion + " State " + state + " ID " + Integer.toHexString(packetId), e); + + " Protocol " + protocolVersion.id + " State " + state + " ID " + Integer.toHexString(packetId), e); } if (msg.isReadable()) { throw new CorruptedFrameException("Did not read full packet for " + packet.getClass() + " Direction " + direction - + " Protocol " + protocolVersion + " State " + state + " ID " + Integer.toHexString(packetId)); + + " Protocol " + protocolVersion.id + " State " + state + " ID " + Integer.toHexString(packetId)); } out.add(packet); }