3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-17 05:20:14 +01:00

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.
Dieser Commit ist enthalten in:
Andrew Steinborn 2018-09-04 00:50:24 -04:00
Ursprung c5dcfb1ba6
Commit c021eb2020

Datei anzeigen

@ -38,11 +38,11 @@ public class MinecraftDecoder extends MessageToMessageDecoder<ByteBuf> {
packet.decode(msg, direction, protocolVersion.id); packet.decode(msg, direction, protocolVersion.id);
} catch (Exception e) { } catch (Exception e) {
throw new CorruptedFrameException("Error decoding " + packet.getClass() + " Direction " + direction 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()) { if (msg.isReadable()) {
throw new CorruptedFrameException("Did not read full packet for " + packet.getClass() + " Direction " + direction 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); out.add(packet);
} }